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
Hi!
For OSX (and i guess other unix)
rsync -av -progress --exclude="node_modules" sourceToCopy destination
Excellent, thanks
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.