Last active
July 29, 2020 23:24
-
-
Save gitUmaru/c303ab10101ab86eccf36a151011658b to your computer and use it in GitHub Desktop.
Delete certain files --- This very short python script simply deletes all files with a certain extension (or some other pattern). I took photos on a bike ride and the SD card was riddled with raw files and the JPG files; I only needed the JPG so this script removes any unwanted files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
filenames = glob.glob('*.ARW') | |
for file in filenames: | |
os.remove(file) | |
print(file + " has been deleted, moving on to next file") | |
print("All files have been deleted, thank you") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment