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

Vanabel/ 5月 22, 2014/ 说说/ 0 comments

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

for /d %f in (docs\*) do (
pushd %f
move .\*.* ..
popd
)

然后再删除空目录

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

Share this Post

Leave a Comment

您的电子邮箱地址不会被公开。

*
*

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据