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

留言

這個網誌中的熱門文章

Xeron 影印機 error code 「016-799」/ 異常結束 016-799 解決方法

HP DeskJet 3720 Printer 不能直接連線WiFi 打印和 WiFi Direct default password

Adobe reader DC open file very slow 解決開PDF超慢問題。