移动位于docs下的子文件夹里面的文件到根目录docs下 for d %f in docs\* do pushd…

移动位于docs下的子文件夹里面的文件到根目录docs下

然后再删除空目录

for /f "delims=" %d in ('dir /s /b /ad ^| sort /r') do rd "%d"

The following will move all the files and folders, including empty ones, deleting each original file after it has moved it.
robocopy /move /e sourcedir destdir

发表评论