Created
December 3, 2019 18:30
-
-
Save mujeebishaque/c500aca5bbc93a60f1f1a3f68e201c50 to your computer and use it in GitHub Desktop.
delete all the .xml files from your images dataset including folders, subfolders
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 os | |
for root, dirs, files in os.walk(os.getcwd()): | |
for _dir in dirs: | |
current_dir = os.getcwd() + os.sep + _dir | |
for x in os.listdir(current_dir): | |
if x.endswith(".xml"): | |
# print(current_dir + os.sep + x) | |
os.remove(current_dir + os.sep + x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment