batch-delete

Command line utility to batch delete folders from Github, Dropbox or your file system.

Usage no npm install needed!

<script type="module">
  import batchDelete from 'https://cdn.skypack.dev/batch-delete';
</script>

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

Road map

  • recursively delete a folder from all supported services
  • oauth to connect to github and dropbox
  • remember connection token from oauth
  • use batch instead of delete each file
  • 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