ycopy
v0.1.2
Published
A cli for copy files and folders
Downloads
9
Readme
Ycopy
Installation
yarn add ycopy
Usage
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 -i
copy 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'.