multi copy or move
- Install: install command line tool 'cpmd' (copy markdown)
$ npm install cpmd -g
- Multi Copy/Move: copy two files named 'README.md' and 'REMORE.md'.
$ cpmd -s 'RE*.md' -d backup/
src file wildcard: RE*.md
src file list: README.md,REMORE.md
cp assets/image-20190625115442118.png to /Users/downgoon/Documents/backup/
cp README.md to /Users/downgoon/Documents/backup/
cp REMORE.md to /Users/downgoon/Documents/backup/
$ tree . # the two files' layout
.
├── README.md
├── REMORE.md
└── assets
└── image-20190625115442118.png
NOTE: wildcard src fie name like 'RE*.md' MUST be quoted by single quotation marks
'
.
- Single Copy: copy a single file named 'README.md' with its referenced image 'assets/image-20190625115442118.png' into the existed dir 'backup' in long term format.
$ cpmd --src README.md --dst backup/
src file wildcard: README.md
src file list: README.md
cp assets/image-20190625115442118.png to /Users/downgoon/Documents/backup
cp README.md to /Users/downgoon/Documents/backup
- Single Move: move a single file in short term format. the additional argument '-m' or
--move
indicates a moving operation rather than copying.
$ cpmd -s README.md -d backup/ -m
src file wildcard: README.md
src file list: README.md
mv assets/image-20190625115442118.png to /Users/downgoon/Documents/backup/
mv README.md to /Users/downgoon/Documents/backup/