公告
财富商城
积分规则
提问
发文
2019-01-21 19:07发布
女痞
What is the best command to move all files from one folder to another?
I want to do this from within a batch file.
This command will move all the files in originalfolder to destinationfolder.
MOVE c:\originalfolder\* c:\destinationfolder
(However it wont move any sub-folders to the new location.)
To lookup the instructions for the MOVE command type this in a windows command prompt:
MOVE /?
move c:\sourcefolder c:\targetfolder
will work, but you will end up with a structure like this:
c:\targetfolder\sourcefolder\[all the subfolders & files]
If you want to move just the contents of one folder to another, then this should do it:
SET src_folder=c:\srcfold SET tar_folder=c:\tarfold for /f %%a IN ('dir "%src_folder%" /b') do move %src_folder%\%%a %tar_folder% pause
最多设置5个标签!
This command will move all the files in originalfolder to destinationfolder.
(However it wont move any sub-folders to the new location.)
To lookup the instructions for the MOVE command type this in a windows command prompt:
will work, but you will end up with a structure like this:
If you want to move just the contents of one folder to another, then this should do it: