kaze 当前离线
上等兵
@echo off pause for /f "tokens=1-3 delims= " %%a in ('dir /b/ad ') do ( echo %%a %%b %%c if not exist "%%a-%%b" md "%%a-%%b" move /Y "%%a %%b %%c" "%%a-%%b" ) pause复制代码
评分人数
TOP
DiamondbacK 当前离线
PowerShell -c "ls | ? { $_.PSIsContainer } | ForEach { if (-Not (Test-Path ($NewName = $_.Name -replace ' *[^ -~].*', '' -replace ' +', '-'))) { md $NewName }; move $_ $NewName }"复制代码
PowerShell -c "ls | ? { $_.PSIsContainer } | ForEach { md ($NewName = $_.Name -replace ' *[^ -~].*', '' -replace ' +', '-'); move $_ $NewName }"复制代码
$ dir /b /ad | PowerShell -c "$input | ForEach { move $_ (md ($_ -replace ' *[^ -~].*', '' -replace ' +', '-')) }"复制代码
$ PowerShell -c "ls | ? { $_.PSIsContainer } | ForEach { move $_ (md ($_ -replace ' *[^ -~].*', '' -replace ' +', '-')) }"复制代码