Created
September 21, 2019 22:28
-
-
Save zapirkon/6621181b0b528b8b1d921769601aba1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copying entire folders or pulling files in single folder using node modules cpy and copyfiles | |
1. Copy files from anywhere in folder tree to flat folder: | |
copyfiles -f source-folder/**/subfolder/*.ts destination/ts | |
or | |
cpy source-folder/**/subfolder/*.ts destination/ts | |
2. Copy all folder contents. If source and destination are on same level and we want to copy contents from source to destination: | |
copyfiles source/**/* destination/ | |
or | |
cpy --parents --cwd=source ** ../destination | |
When using cpy, cwd is set to source, so we need to find destination one folder before source (if we use relative path for destination) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment