



When any of the strings matches any part of the absolute path of the file to be copied, that file will be excluded from being copied. Each string should be in a separate line in the files. How to Let Xcopy Exclude Folders and Files CorrectlyĪccording to Microsoft, /exclude specifies a list of files containing strings. Then, what is the proper way of letting xcopy exclude files in folder when copying? However, some users find xcopy does not exclude files that were written behind EXCLUDE command, or the files cannot be read. Microsoft also provides many xcopy command examples for users in different situations. Xcopy, a useful Windows command, allows you to copy files and directories including subdirectories to another place. Is that even possible to make xcopy exclude folders or files while copying? If yes, what should I do to achieve?” It keeps saying ‘can’t read files: /My Music /My Photos’. Run this command: xcopy c:\t1 c:\t2 /EXCLUDE: /My Music /My Pictures’ without quotes but with no luck. “I’d like to copy files and folders in a directory to another folder excluding a list of files and folders. User Case: How can I exclude folders/files using Xcopy?
