[PowerShell] Snippet Script Copy Files that are listed in a text file

$source = "E:\DevExpress22.1.3\DevExpress\Bin\Framework"
$destination = "C:\DevExpress.WinForm\Lib\net472"
$file_list = Get-Content "C:\DevExpress21.1.4\fileList.txt" 

foreach ($file in $file_list)
{
   $srcPath = $source + "\$file"
   Copy-Item $srcPath $destination
   $srcPath = ""
}

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts sent to your email.