mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
21 lines
428 B
PowerShell
21 lines
428 B
PowerShell
param (
|
|
[string]
|
|
$SourcePath,
|
|
|
|
[string]
|
|
$DestinationDir
|
|
)
|
|
|
|
Write-Host $SourcePath
|
|
Write-Host $DestinationDir
|
|
|
|
if (!(Test-Path -Path $DestinationDir))
|
|
{
|
|
New-Item -Path $DestinationDir -ItemType "directory"
|
|
}
|
|
|
|
$sourceFiles = Get-ChildItem -Path $SourcePath -Recurse | ?{$_.Extension -match "exe|msi"}
|
|
foreach ($item in $sourceFiles)
|
|
{
|
|
Copy-Item -Path $item.FullName -Destination $DestinationDir -Force
|
|
} |