This script can be used to delete a set of files in a directory, given a specific file extension, it's main use case to delete the lebels of the training data in AI projects.
- Python 3.x
-
Replace the directory variable in the script with the path to the directory that contains the files to be deleted.
-
Replace the '.txt' string in the if statement with the file extension of the files to be deleted.
-
Run the script.
- Be careful when using this script as it permanently deletes files from the specified directory. Make sure you have a backup of the files before running the script.