# Load and parse the text file with the folders to exclude from the AppData directory function parse_appdata_exclude($skip=@(), $add=@()) { $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_appdata.list) $exclude = @() foreach ($line in $exclude_list.Split("`n")) { if ($line -in $skip) { continue } else { $exclude += '-xr"!' + $line.Trim() + '"' } } foreach ($line in $add) { Write-Host "Adding $line" $exclude += '-xr"!' + $line + '"' } return $exclude } function parse_sync_exclude() { $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_sync.list) $exclude = @() foreach ($line in $exclude_list.Split("`n")) { $exclude += $line.Trim() } return ("| " + ($exclude -join ";")) }