30 June, 2010
0 Comments
1 category
If you have a Microsoft Visual Studio 2010 solution, which contains setup projects and you want to copy all msi packages from the “Release” folders to one folder you can use the following script:
$SourceFolder = "C:\Source"
$DestinationFolder = "C:\Destination"
"Copy *.msi packages from [Release] subfolders in $SourceFolder to the $DestinationFolder"
if(Test-Path $SourceFolder )
{
foreach ($item in Get-ChildItem "$SourceFolder" -filter "*.msi" -recurse)
{
if ($item.FullName -like "*Release*" )
{
Copy-Item $item.FullName -Destination "$DestinationFolder"
}
}
}
Tags: PowerShell
Category: Uncategorized