回复 9# idwma
好像丢} 了,改成下面能执行了,但是B下的第一个子文件夹分配了, 其它的没有分配- #&cls&@powershell -c "Get-Content '%~0' | Select-Object -Skip 1 | Out-String | Invoke-Expression" &pause&exit
- $k = 2
- Get-ChildItem ".\A" -Directory | Sort-Object { [int]($_.Name -split '\s+')[0] } | foreach-Object { [array]$a += $_.FullName }
- dir .\b | ?{ $_.PSIsContainer } | %{
- if (test-path "$($_.fullname + '\ok')") { while ($j++ -le $k) { move $a[$i++] $_.fullname } }
- if ($a[$i] -eq $null) { "分完" }
- }
复制代码
|