recycle-bin

Restoring files from the recycle bin in python

Restoring files from the recycle bin in python Question: Is there any to restore files from the recycle bin in python? Here’s the code: from send2trash import send2trash file_name = "test.txt" operation = input("Enter the operation to perform[delete/restore]: ") if operation == "delete": send2trash(file_name) print(f"Successfully deleted {file_name}") else: # Code to restore the file from …

Total answers: 2

How can I move file into Recycle Bin / trash on different platforms using PyQt4?

How can I move file into Recycle Bin / trash on different platforms using PyQt4? Question: I would like to add the next feature to my cross-platform PyQt4 application: when user selects some file and select “remove” action on it that file will be moved to Recycle Bin folder instead of being permantly removed. I …

Total answers: 3