I am trying to xcopy specific folders from some directory to another folder, problem is i don't want to copy all the folders but i want specific folders. E.g. DirectorySource has folders (folderA,folderB,folderC) but i want to copy folderA and folderB only to DirectoryDestination.
How to use xcopy to select specific folders(Not Files) within another folder
cmdcommand linexcopy
Related Topic
- How to copy files from folder tree dropping all the folders with Robocopy
- Windows – How to delete files/subfolders in a specific directory at the command prompt in Windows
- Xcopy file, rename, suppress “Does xxx specify a file name…” message
- How to use grep to find a word inside a folder
- Windows – Create folder with batch but only if it doesn’t already exist
Best Answer
Create a text file, say
C:\excludes.txt
with the following contents:then you can copy:
The file excludes.txt contains a list of strings, one per line. If a file or directory matches that string, then it will not be copied. If you want to exclude folder, it is safer to use the above string instead of simply
folderC
, which might skip a file calledfolderC_listing.txt