- @echo off&pause
-
- for %%a in (*) do (
- set file=%%a
-
- setlocal enabledelayedexpansion
- set file=!file:[=/!
- for %%b in ("!file!") do endlocal&set file2=%%~nb%%~xb
-
- setlocal enabledelayedexpansion
- if "!file!" neq "!file2!" (
- for /f "tokens=1,2 delims=]" %%c in ("!file2!") do (
- endlocal
- if "%%d" neq "" (
- if not exist "%%c" echo mkdir "%%c"&mkdir "%%c"
- echo,
- echo move "%%a" "%%c\"
- echo,
- move "%%a" "%%c\"
- )
- )
- ) else endlocal
- )
- pause
复制代码
|