How To Optimize iFolder Synchronization with Advanced Filter Settings
How To Optimize iFolder Synchronization with Advanced Filter Settings
Table of Contents
- Introduction
- Registration
- Using Advanced Installer
- GUI
- Working with Projects
- Installer Project
- Patch Project
- Merge Module Project
- Updates Configuration Project
- Windows Store App Project
- Modification Package Project
- Optional Package Project
- Windows Mobile CAB Projects
- Visual Studio Extension Project
- Software Installer Wizards - Advanced Installer
- Visual Studio integration
- Alternative to AdminStudio/Wise
- Replace Wise
- Migrating from Visual Studio Installer
- Keyboard Shortcuts
- Shell Integration
- Command Line
- Advanced Installer PowerShell Automation Interfaces
* IAdvancedInstaller
* IAdvinstProject
* IProductDetails
* IFolder
* IFoldersComponent
* IPredefinedFolders
* IFolderOperations
* IFolderSync
* IFolderSyncFilters
* ILaunchConditionsComponent
* IFilesComponent
* IIniFilesComponent
* IShortcut
* ITempFile
* IXmlFile
* IDirectoryMember
* IRegistryComponent
* IInstallParameters
* IBuildComponent
* ITextFileUpdatesComponent
* ITextUpdateFile
* ITextUpdateAppendOrCreate
* ITextUpdateReplace
* IFileAssociations
* IDefaultProgramFA
* IExtensionFA
* IProgIdFA
* IVerbFA
* IEnvironment
* IEnvironmentVariable
* IProductCode
* IUpgradeCode
* IMergeModulesComponent
* IMergeModule
* IDigitalSignature
* ICustomActionsComponent
* ITranslationsComponent
* IDriversComponent
* ISearch
* IServices
* IOrganizationComponent
* IComComponent
* IRemoveFilesComponent
* IRemoveFile
* IUpdatesProject
* IUpdaterComponent
* IPatchProject
* IPropertyComponent
* IProperty
* IPathVariable
* IMsixComponent
* IMsixDependencies
* IMsixDriverDependency
* IMsixDriverConstraint
* IMsixExternalDependency
* IMsixPackageDependency
- Features and Functionality
- Tutorials
- Samples
- How-tos
- FAQs
- Windows Installer
- Deployment Technologies
- IT Pro
- MSIX
- Video Tutorials
- Advanced Installer Blog
- Table of Contents
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
IFolderSyncFilters
This interface is meant to specify the filters that allow you to select which files will be added from the synchronized folder to the package.
Declaration
IFolderSyncFilters : IDispatch
Properties
Array
Bool ReadOnlyFiles - Gets or sets the option that will specify if the “ReadOnly” attribute of the files that will be added to the package.
Bool HiddenFiles - Gets or sets the option that will specify if the “Hidden” attribute of the files that will be added to the package.
Bool SystemFiles - Gets or sets the option that will specify if the “System” attribute of the files that will be added to the package.
Bool ArchiveFiles - Gets or sets the option that will specify if the “Archive” attribute of the files that will be added to the package.
Bool SparseFiles - Gets or sets the option that will specify if the “Sparse” attribute of the files that will be added to the package.
Bool ReparsePointFiles - Gets or sets the option that will specify if the “ReparsePoint” attribute of the files that will be added to the package.
Bool CompressedFiles - Gets or sets the option that will specify if the “Compressed” attribute of the files that will be added to the package.
Bool OfflineFiles - Gets or sets the option that will specify if the “Offline” attribute of the files that will be added to the package.
Bool EncriptedFiles - Gets or sets the option that will specify if the “Encripted” attribute of the files that will be added to the package.
String ExcludeSubfolders - Gets or sets the excluded sub-folders. This is available only on exclude filters.
Methods
NewNamePattern(String aNamePattern) - Adds a new name pattern to the collection that will be used to filter files.
RemoveNamePattern(String aNamePattern) - Removes a name pattern from the collection that will be used to filter files.
Examples
Method 1: use Advanced Installer support for folder synchronization
$advinst = new-object -comObject "AdvancedInstaller"
$proj = $advinst.CreateProjectS(“architect”)
$new_folder = $proj.PredefinedFolders.ApplicationFolder.CreateFolder(“MyApplication”)
$new_folder.Synchronization.SourceFolder = “D:\MyApplication\MyApplication\bin\Release”
$new_folder.Synchronization.ExcludeFilters.NewNamePattern(“.pdb”)
$new_folder.Synchronization.ExcludeFilters.NewNamePattern(“.aip”)
$proj.SaveAs(“D:\MyApplication\MyApplication\Setup\Setup.aip”)
$proj.Build()
Copy
Method 2: use PowerShell for scanning folder contents + Advanced Installer
$advinst = new-object -comObject "AdvancedInstaller"
$proj = $advinst.CreateProject($advinst.ProjectTypes.Architect)
add new folder
$new_folder = $proj.PredefinedFolders.ApplicationFolder.CreateFolder(“MyApplication”)
$folder_to_sync = “D:\MyApplication\MyApplication\bin\Release”
get all resources from folder
$resources = Get-ChildItem $folder_to_sync -Exclude (“.pdb”, “.aip”) -Recurse
foreach ($res in $resources)
check if is directory
if($res.Mode -eq "d-----")
create path to folder in aip
$path_to_aip = $res.FullName.Replace($folder_to_sync, $new_folder.FullPath)
create folder if it does not exist in aip
if (!$proj.FoldersComponent.FindFolderByPath($path_to_aip))
create path relative to $new_folder
$folder_path_relative = $path_to_aip.Replace("$($new_folder.FullPath)\", "")
$new_folder.CreateFolder($folder_path_relative)
item is a file and should be added to project
else
create path to file relative to $new_folder
$file_path_relative = $res.Directory.FullName.Replace("$($folder_to_sync)\", "")
if ($res.Directory.FullName -eq $folder_to_sync)
$proj.FilesComponent.AddFileS($new_folder.FullPath, $res.FullName)
else
$proj.FilesComponent.AddFileS("$($new_folder.FullPath)\$file_path_relative", $res.FullName)
$proj.SaveAs(“D:\MyApplication\Setup\Setup.aip”)
Copy
See also
Did you find this page useful?
Please give it a rating:
Thanks!
Report a problem on this page
Information is incorrect or missing
Information is unclear or confusing
Something else
Can you tell us what’s wrong?
Send message
Also read:
- [Updated] 2024 Approved Insta's Tunes Ownership & Legalities
- 2024 Approved Top 10 Free Video Translators to Mitigate Translation Risks
- 解决方案:在Windows 11中处理OneDrive错误码0x8004def7
- 全方位Windows 11 NVMe SSD数据克隆指导:从头到尾每一步分享
- Accessing Secure Websites Easily with Publicly Available DNS Options
- Erfolgreich Speicherdaten Retten: Eine Umfassende Lösungsanleitung Für Festplattenfehler Auf Computern
- Error Code, Windows Backup, and Solution.
- In 2024, Top 15 Apps To Hack WiFi Password On Nokia C12 Plus
- In-Depth Evaluation of the OnePlus
- Is Tenorshare Data Recovery Worth Your Investment? An In-Depth Analysis
- No Money, No Problem Master FCP Legally for 2024
- Strategies for Apps That Wont Download From Play Store On Nokia G310 | Dr.fone
- Ultimate Guide: Effortlessly Upgrade From Windows 10 to 11 or Vice Versa with Top Tools
- Windows 10 Backup: Fehler 'Unbekannte Oder Nicht Verwendbare Festplatten Erkannt' - Lösungsansätze
- Windows RAM Cache Basics and Cleansing Methods
- Title: How To Optimize iFolder Synchronization with Advanced Filter Settings
- Author: Scott
- Created at : 2024-10-14 18:26:23
- Updated at : 2024-10-16 17:38:19
- Link: https://fox-ssl.techidaily.com/how-to-optimize-ifolder-synchronization-with-advanced-filter-settings/
- License: This work is licensed under CC BY-NC-SA 4.0.