@echo off
for /f "delims=" %%a in ('dir /ad /b') do (
for /f "delims=" %%b in ('dir /a-d /s /b "%%~a"') do (
move "%%~b" "%%~a"
)
)
该命令存储为bat批处理文件后可以移动子文件夹下的文件到上一级目录
@echo off
for /f "delims=" %%a in ('dir /ad /b') do (
for /f "delims=" %%b in ('dir /a-d /s /b "%%~a"') do (
move "%%~b" "%%~a"
)
)
该命令存储为bat批处理文件后可以移动子文件夹下的文件到上一级目录