Title
$file= Get-Content "list.csv"
foreach ($line in $file){
$arr = $line.Split(",")
N_m3u8DL-CLI_v2.9.7.exe $arr[0] --saveName $arr[1]
Write-Host $arr[1]
}
Start-Transcript -path C:\powershelllog.txt -Force -Append –NoClobber
Get-ChildItem -Path \\127.0.0.1\dir1 *_1.* | ForEach-Object -Process{
if($_ -is [System.IO.FileInfo])
{
$dupName=$_.BaseName;
$orgName=$dupName.Remove($dupName.Length-2,2);
$orgFile=$orgName+$_.Extension;
$desPath="\\127.0.0.1\dir2";
$orgFullName=($_.Directory.FullName+"\"+$orgFile);
;
if( [System.IO.File]::Exists($orgFullName)){
Write-Host($orgFile+" Moved to "+$desPath+".")
Move-Item $orgFullName -Destination $desPath
Rename-Item $_.FullName -NewName $orgFile
}
else
{
Write-Host($orgFile+" Not Find.");
}
}
}
Stop-Transcript