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.
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