Windows copy files and exclude folders (node_modules)


Using Xcopy create an excludes.txt file with following content:

node_modules
.metadata
.idea

Now execute the following Xcopy command:

Xcopy /I /S /E <SourceDir> <TargetDir> /EXCLUDE:excludes.txt


# Example: Xcopy /I /S /E C:\Projects E:\Backup\Projects /EXCLUDE:excludes.txt

Leave a comment

Your email address will not be published.