0.0.0 • Published 1 month ago

safemove v0.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

SafeMove File Utility

The following document applies to the command-line usage of safemove. For usage directly in a Node application, please see the alternate README located here.

Purpose

Recursively copy and delete files and folders from one location to another.

More info on why I created this is on my blog: https://fredlackey.com

Installation

npm i -g safemove

Usage

Move files and folders from one location to another...

safemove \
  --source "/Users/flackey/Documents/Screenshots" \
  --target "/Volumes/MPHD01/Screenshots"

... or, add use the backup switch to safely store copies of files that will be overwritten ...

safemove \
  --source "/Users/flackey/Documents/Screenshots" \
  --target "/Volumes/MPHD01/Screenshots" \
  --backup "/Volumes/BACKUP01/Screenshots"

Of course, you can always prevent overwriting at all costs by using the --nooverwrite switch...

safemove \
  --source '/Users/flackey/pCloud Drive/Automatic Upload/' \
  --target /Volumes/MPHD01/Multimedia/Photos/ \
  --nooverwrite

The addition of the --console switch adds an output which is helpful for long-running operations...

Console Output

Parameters

NameDescriptionTypeDefault
sourceSource Directorystring (path)
targetDesination Directorystring (path)
backupBackup Directorystring (path)
nooverwriteOverwrite existing target filesbooleanfalse
consoleLog activity to consolebooleanfalse
limitNumber of files to processnumber

Contact

Please feel free to contact me directly with any questions, comments, or enhancement requests:

Fred Lackey
fred.lackey@gmail.com
http://fredlackey.com

0.0.0

1 month ago