1. Ultimate Guide to iFolder Sync: Mastering Your Filters
1. Ultimate Guide to iFolder Sync: Mastering Your Filters
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:
- [New] Safety First Where to Buy Followers on TikTok Responsibly
- [Updated] Rapid Runners Prime Fastest Titles for PC, Mobile Devices for 2024
- 2024 Approved Image Trimming Techniques Apple's iOS Solutions
- 2024 Approved Unravel the Mystery of Accessing Your Watchlist on Facebook
- 最好的视频剪辑工具:为何及如何购买?
- Discover the Perfect Property Match – Navigate With Us at IProperty
- Effective Techniques to Amplify Audio in Your Videos
- Efficiently Navigate with Shortcut Options in Property Mode
- How to Efficiently Process Game Console Returns
- Launching Your Digital Dialogues in Google Meet for 2024
- Streamlined Guide: Transforming YouTube Media to Audio Format with MP3 Conversion Techniques
- Tailor Your Summary Info Window
- Taylor Swift Filmography - The Definitive Viewing Order Explained
- YouTubeやVimeoなど、映像ファイルに他のビデオを組み込む方法
- Title: 1. Ultimate Guide to iFolder Sync: Mastering Your Filters
- Author: David
- Created at : 2024-10-04 01:44:30
- Updated at : 2024-10-10 20:54:23
- Link: https://fox-zaraz.techidaily.com/1-ultimate-guide-to-ifolder-sync-mastering-your-filters/
- License: This work is licensed under CC BY-NC-SA 4.0.