Skip to content

This is a safe remove toolkit implemented by python

Notifications You must be signed in to change notification settings

whoiszzj/SafeRemove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeRemove

This is a Linux tool which aims to safe remove files only depends on python.

Usage

demo.png

You can use the following code to safely delete files with a preview.

python main.py <path1> <path2> ...

Press 'y', 'Y' or nothing and then Enter, the files will be deleted, otherwise the files will be kept. Mention that the path supports regular expression, so you can use the following code to delete all files in the current directory.

python main.py ./*

Install

Besides you can build an executable file with the script build.sh, and the file will exist in the directory dist. (pyinstaller is required!) If you meet the problem that the 'pathlib' package is an obsolete backport balabala...., you can refer to this, in brief, change you pyinstaller to a lower version such as, 5.1.

Log

2023-12-25: Support remove the symbolic link and the mount point.

2023-06-22: When delete a single file from a directory, it will show the complete path of the file. Besides, add ctrl + C to exit the program.

2023-06-11: upload the init version 1.0, add basic functions.

Reference

Thank all answers from https://stackoverflow.com/questions/9727673/list-directory-tree-structure-in-python and https://stackoverflow.com/questions/75476135/how-to-convert-python-file-to-exe-the-pathlib-package-is-an-obsolete-backport

About

This is a safe remove toolkit implemented by python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published