2.0.9 • Published 2 years ago

batch-deletion-node-version v2.0.9

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years ago

batch-deletion

Delete files🗃 in one go with same extension/filetype. Node version

Have you encounterd a situation where you have to select multiple files📁 with same filetype/extension to delete them, I have

when deleting multiple .srt files from my directory.

‍Prerequisites

node js

🔮 Usage

> npm install -g batch-deletion-node-version
> bd --filetype --path

It is ❗important❗ to specify the file type or extension.

--filetype or -ft

It is optional to specify the path, by default it will take current working directory.

--path or -p

🪜 Example

> bd --filetype txt

or

> bd -ft txt

✖️ Multiple file type arguments

You can pass multiple filetypes at sametime

> bd -ft txt java cpp

🚶‍♀️ Walk through subdirectories.

Suppose you want to delete file.txt from each directory inside the current directory. you have to pass flag -sd or --subdir as true. By default the flag is false so it wont delete files from sub-directories.

Current Directory
 └─> test
     ├── file.txt
     └─> first folder
         ├── file.txt
         └─> second folder
             ├── file.txt
             └── test.java
C:\Current Directory> bd -sd -ft md

This will delete all file's with extension as .md from given directory📂 and it's subdirectories🗃.

Command-line Options

FLAGS:
    -ft, --filetype               Type/extension of the file.
    -p, --path                    Diretory link (by default current directory)
    -sd, --subdir                 Check's for the files in subdirectories.
    --------------------------------------------------------------------------
FLAG OPTIONS:
    -ft [Multiple fileTypes]      Accepts multiple filetypes.
    -p  [Dir path]                Accepts single directory path.
    --------------------------------------------------------------------------
OPTIONAL FLAGS
    -p, --path
    -sd --subdir

🗜️ Changelog

  • Command change from batch-delete to bd.
  • No need to pass true as an option to -sd flag.
  • few other things.

Previous version

  • Visual changes.
  • Logs time taken.
  • No need to pass true as an option to -sd flag.
  • few other things.

  • Performance improved.
  • flag -sd to allow deleting from sub-directories.
  • Removed flag -dt for directory tree.
2.0.7

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.6

2 years ago

2.0.5

3 years ago

2.0.3

3 years ago

2.0.4

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago