windows - Batch copying to all folders -
i need batch copy 2 folders, let's call them , b, f:\sourcefolder\
f:\destinationfolder
subfolders (not destination folder itself).
now know when batch copying file (file.exe
example) supposed
for /r "f:\destinationfolder" %%i in (.) @copy "f:\sourcefolder\file.exe" "%i"
in each of subfolders there lot of files. after copying , b folders subfolders, move files within subfolders folder within folder. possible do?
the xcopy command designed folder copy, for /d
list level1 folders:
for /d %%a in ("f:\destinationfolder\*") ( xcopy "f:\sourcefolder\a\*" "%%~fa" /s /i xcopy "f:\sourcefolder\b\*" "%%~fa" /s /i )
for recursive copy (all subfolders):
for /r /d "f:\destinationfolder\" %%a in (*) ( xcopy "f:\sourcefolder\a\*" "%%~fa" /s /i xcopy "f:\sourcefolder\b\*" "%%~fa" /s /i )
for /r
not work if there's no wildcard in brackets - ?
or *
Comments
Post a Comment