How to copy all files not include directories to specify the directory (Command)
How to copy all (only)files not include directories
In CMD use following command :for /r %f in (*) do @copy "%f" target
e.g. want copy all file under c:\test to c:\temp
cd\test
for /r %f in (*) do @copy "%f" c:\temp
p.s. There are spec between in" "(*)" " do .
Within the loop it just copy file into a specified folder(target) "for /r" will walk a directory tree recursively, looking for file names matching the given pattern.
Specify the directory to start :
for /r FolderA %f in (*) do @copy "%f" target
p.s. There are spec between in" "(*)" " do .
Within the loop it just copy file into a specified folder(target) "for /r" will walk a directory tree recursively, looking for file names matching the given pattern.
Specify the directory to start :
for /r FolderA %f in (*) do @copy "%f" target
留言
張貼留言