https://github.com/fredlackey/safemove
Safely move files and folders
https://github.com/fredlackey/safemove
Last synced: 2 months ago
JSON representation
Safely move files and folders
- Host: GitHub
- URL: https://github.com/fredlackey/safemove
- Owner: FredLackey
- License: apache-2.0
- Created: 2024-03-10T12:21:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-25T10:18:13.000Z (about 1 year ago)
- Last Synced: 2025-02-24T12:41:21.708Z (3 months ago)
- Language: JavaScript
- Size: 581 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-ALT.md
- License: LICENSE
Awesome Lists containing this project
README
# SafeMove File Utility
> The following document applies to the programatic usage of `safemove`. For use from the command line, please see the [main README located here](README.md).
## 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](https://www.fredlackey.com)
## Installation
```bash
npm i safemove
```## Usage
```bash
const safemove = require('safemove');const results = safemove.process({
source : '/Users/flackey/Documents/Screenshots',
target : '/Volumes/MPHD01/Screenshots',
nooverwrite : true
});
```### Options
| Name | Description | Type | Default |
|---------------|---------------------------------|-----------------|---------|
| `source` | Source Directory | `string (path)` | |
| `target` | Desination Directory | `string (path)` | |
| `backup` | Backup Directory | `string (path)` | |
| `nooverwrite` | Overwrite existing target files | `boolean` | `false` |
| `console` | Log activity to console | `boolean` | `false` |
| `limit` | Number of files to process | `number` | |### Contact
Please feel free to contact me directly with any questions, comments, or enhancement requests:
**Fred Lackey**
**[[email protected]](mailto://[email protected])**
**[http://fredlackey.com](http://www.fredlackey.com)**