https://github.com/fhsinchy/rmbyext
Recursively removes all files with given extension(s)
https://github.com/fhsinchy/rmbyext
python3
Last synced: 3 months ago
JSON representation
Recursively removes all files with given extension(s)
- Host: GitHub
- URL: https://github.com/fhsinchy/rmbyext
- Owner: fhsinchy
- License: mit
- Created: 2018-08-29T14:24:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-20T11:02:05.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T04:26:11.967Z (over 1 year ago)
- Topics: python3
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 50
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Remove(rm) by Extension(ext)
Assume a situation when you have to delete a lot of files of certain extension recursively from hundreds of folder. This program makes that task very easy.
## Requirements
* Python 3
## Installation
```shell
pip install git+https://github.com/fhsinchy/rmbyext.git#egg=rmbyext
pip freeze
```
Output –
```shell
rmbyext==1.0.0
```
## Usage
Once you have installed the package it should be available everywhere in your system. The generic command for executing this script is
```shell
rmbyext
```
or in case of multiple extensions
```shell
rmbyext
```
Lets say you want to delete all the **PDF** files from a directory. You simply put this script on that directory and execute
```shell
rmbyext pdf
```
The script will look for all **PDF** files recursively and delete all of them. As stated above you can also pass multiple extensions separated by space
```shell
rmbyext pdf txt
```
This command will delete all **PDF** and **TXT** files.
List of the deleted files will be shown on the console as well as written inside `delete_log.log` file in the same directory.