Skip to content

Instantly share code, notes, and snippets.

@driescroons
Last active April 24, 2024 00:02
Show Gist options
  • Save driescroons/8e9e712c886ed4b46093d939d1b90899 to your computer and use it in GitHub Desktop.
Save driescroons/8e9e712c886ed4b46093d939d1b90899 to your computer and use it in GitHub Desktop.
Copy projects without node modules on windows

Copy projects without node modules on windows

Create a exclude.txt and paste the following.

node_modules

You can also add additional folders. The following example was my exclude.txt

node_modules
.parcel-cache
.next
logs

I used this to backup old files to an external drive:

xcopy "C:\Users\dries\Documents" "G:\Documents" /EXCLUDE:except.txt /S

This was ran in powershell.

@Yamadetta
Copy link

Thanks a lot! Wasted 3 hours in vain, but you could just google ...

In the example above, you write about exclude.txt, and then in the command you specify about except.txt

@CarlosACepeda
Copy link

Thank you man, you saved me hours of waiting for copying, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment