Unable to exclude files with command line
Posted: Sat Jan 09, 2016 6:05 am
I'm trying to automate a deployment process by incorporating the copy of all "new" & "modified" files to a staging server ... I want to be able to exclude all files with the following extensions: xml, pdb & bak ... I'm executing the following statements within a powershell script:
ExamDiff is able to compare $SourceDirectory to $TargetDirectory; however it does not exclude files: $ExamDiffFileExclusion
What am I missing?
Carl.
Code: Select all
$Product = "XXXX"
$DeploymentDate = "YYYY-MM-DD"
$ExamDiffProgram = "C:\Program Files\ExamDiff Pro\ExamDiff.exe"
$ExamDiffFileExclusion = "*.xml,*.pdb,*.bak"
$ExamDiffFileInclusion = "*.xml,*.pdb,*.bak"
$ExamDiffLog = "C:\Temp\ExamDiff_$($Product)_$($DeploymentDate).log"
$SourceDirectory = '\\<DROP SERVER>\Builds\<BUILD DEFINITION>\<BUILD NUMBER>\_PublishedWebSites\<WEB APPLICATION>'
$TargetDirectory = '\\<DEPLOY SERVER>\Inetpub\<WEB SITE>\<WEB APPLICATION>'
$ExamDiffArguements = "$SourceDirectory $TargetDirectory /fi:$ExamDiffFileInclusion /fx:$ExamDiffFileExclusion /r2 /i /w /k /dv /o:$ExamDiffLog"
$Process = ( Start-Process -FilePath "$ExamDiffProgram" -ArgumentList $ExamDiffArguements -Wait -PassThru )
What am I missing?
Carl.