重命名文件并移动
例如文件jinwei.txt先修改为jinwei+随机码.txt(例如:jinwei23.txt)
然后Move到to路径
$from="\10.XX.XXfrom*.*"
$to="C: o"
$a =get-random -maximum 100
$a =[string]$a+".TXT"
Get-ChildItem -Path $from |
Rename-Item -NewName {$_.Name -replace ".txt",$a} -PassThru |
Move-Item -Destination $to -Force