Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Deleting files which start with a name

my_dir = # enter the dir name
for fname in os.listdir(my_dir):
    if fname.startswith("version"):
        os.remove(os.path.join(my_dir, fname))
Source by www.py4u.net #
 
PREVIOUS NEXT
Tagged: #Deleting #files #start
ADD COMMENT
Topic
Name
9+3 =