0.1.2 • Published 8 years ago
ycopy v0.1.2
Ycopy
Installation
yarn add ycopyUsage
ycopy [src] [dest] [options] [-f] [file-filters] [-r] [folder-filters]Options
--version: Show version number.-o,--overwrite: Overwrite existing file or directory, default istrue. Note that the copy operation will silently fail if you set this to false and the destination exists. Use the errorOnExist option to change this behavior.-e,--errorOnExist: When overwrite is false and the destination exists, throw an error. Default is false.-s,--dereference: Dereference symlinks, default is false.-t,--preserveTimestamps: Will set last modification and access times to the ones of the original source files, default is false.-f,--filter-file: To filter copied files. If no filter is apply, all files will be reserved.-r,--filter-folder: To filter copied folders. If no filter is apply, all folders will be reserved.-d,--delete: Delete first before copy files. Default is false.-i,--info: Show more info. Default is false.-h,--help: Show help.
Example
ycopy test/a test/another/a -f .*\.txt .*\.jpg -r "^((?!cd$).)*$" -d -icopy files and folders from test/a to test/another/a, which file is end with .txt or .jpg and folder is not end with sequence 'cd'.