- <# :
- @echo off
- powershell -NoProfile -ExecutionPolicy bypass "Get-Content -literal '%~f0' |Out-String|Invoke-Expression"
- echo 已完成!&pause
- #>
- dir .\零散文件夹\|?{$_ -is [System.IO.DirectoryInfo]}|%{$d=$_.name;$n=$_.FullName;[IO.File]::ReadAllText((dir $_.FullName)[0].fullName) -match '(?<!U)Code="(.*?)"';$code=$Matches[1];if(Test-Path 目标文件夹/$code){}else{md 目标文件夹/$code};move $_.FullName 目标文件夹/$code}
复制代码
|