Here's a quick example (using what snippsat posted):
import glob
import time
import os
def dl():
t = 1361455258.34 #a generic moment of time, access time of a file from the folder Blah
for files in glob.glob(r'E:\blah\*.txt'):
print(files) #prints the content of the folder
if (os.stat(files).st_atime>t):
os.remove(files) #removes desired files
print('\n\n\n')
for files in glob.glob(r'E:\blah\*.txt'):
print(files) #prints the remaining files from the folder
dl()
[Edit]: Also, look above :). 59 seconds earlier than me, but cleaner/better example.
Lucaci Andrew
Practically a Master Poster
696 posts since Jan 2012
Reputation Points: 108
Solved Threads: 98
Skill Endorsements: 13
Ene Uran
Posting Virtuoso
1,830 posts since Aug 2005
Reputation Points: 676
Solved Threads: 255
Skill Endorsements: 7
Question Answered as of 3 Months Ago by
snippsat,
Ene Uran,
np complete
and 1 other