Hi all,
I have a notepad file with a list of folder names. what i need is a batch file that will read from the text file and copy the folders (with subfolders and files) to a different directory.The txt file will have the names of the folders listed.
for example
Folders are located here: C:\source
Folders should be copied here: C:\destination
Which folders exactly needs to be copied stands in the txt.
There is a switch /EXCLUDE in XCOPY, which will allow you exclude files/directories listed in a file you pass to it.
XCOPY source destination /EXCLUDE:fileOf course you will have to edit the "file" to list things you DON'T want to be copied.
@for /f %%a in (copyjob.txt) do xcopy /e /i c:\source\"%%a" c:\destination\"%%a"
@nbrane - Thanks !!!
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |