This one is a simple and handy trick when you want to copy your directories without node_modules folder.
Enter this command in your terminal.
robocopy SOURCE DEST /mir /xd node_modules
is it possible that this code delete my files instead of coping??
Yes. The /MIR switch is equivalent to /e /purge which does delete files in certain cases. See https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy for full details.
Hi!
For OSX (and i guess other unix)
rsync -av -progress --exclude="node_modules" sourceToCopy destination
Excellent, thanks
Hi!
For OSX (and i guess other unix)
rsync -av -progress --exclude="node_modules" sourceToCopy destination
This helped me massively, thank you :)
@Itzikil
So copy it in a new folder, or use another command that does not sync content.
https://superuser.com/questions/940804/copy-large-number-of-files-but-exclude-certain-sub-folders-on-windows