https://github.com/lexoyo/batch-delete
https://github.com/lexoyo/batch-delete
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lexoyo/batch-delete
- Owner: lexoyo
- Created: 2020-11-05T18:12:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T15:15:32.000Z (almost 4 years ago)
- Last Synced: 2025-02-24T20:20:20.410Z (8 months ago)
- Language: JavaScript
- Size: 62.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Command line utility to delete folders from Github, Dropbox or your file system. The deletion is recursive and will be done in 1 operation (e.g 1 commit for github).
Supports **Dropbox, Github, FTP, SFTP, Webdav, NextCloud, OwnCloud** with oauth when available.
This is an efficient way to be clear data which is good for your online storage as well as for mother earth.
See also [this tool to explore your cloud storage and detect which files and folders to start with](https://github.com/lexoyo/cloud-disk-usage)
Road map
* [x] recursively delete a folder from all supported services
* [x] oauth to connect to github and dropbox
* [x] remember connection token from oauth
* [x] use batch instead of delete each file
* [x] option to confirm deletion
* [ ] support cli patterns in file paths## Synopsis
`bd SERVICE FILE [OPTION]...`
Possible values of the `service` option (case **insensitive**):
| description | Service |
| ------- | ------- |
| Dropbox | Dropbox |
| local file system | fs |
| FTP | FTP |
| SFTP | SFTP |
| Github | Github |
| NextCloud/Owncloud (with webdav) | webdav |Available options:
* `-t` test mode => will prompt which file/folder would be deleted
## Examples
Install the npm package
```
$ npm install -g batch-delete
```Delete the local `Documents` folder
```
$ bd fs ~/Videos
Done.
```Delete remote folders:
```
$ bd dropbox Photos
Done.
$ bd ftp www
Done.
$ bd github repo1/master/
Done.
```## Development
### Install
```
$ npm i
```### test
Delete the `test` folder in the current directory
```
$ node ./lib/ fs test
```