hiya guys n girls,
i am making a prgram where it sorts a list of files and pulls the 6 most recent files..
that is fine but i need it to pull 6 different dates ie...
(this is what it does now
test1 - 24/06/10
test2 - 24/06/10
test3 - 24/06/10
test4 - 28/06/10
test5 - 28/06/10
test6 - 29/06/10
)
(this is what i want it to do
test1 - 19/07/10
test2 - 14/07/10
test3 - 09/07/10
test4 - 02/07/10
test5 - 30/06/10
test6 - 29/06/10
)
i have this code which pulls the last 6 modifed dates if this helps
for lastmod_seconds, path in date_file_list[:6]:
folder, file_name = os.path.split(path)
# convert seconds to time tuple
lastmod_tuple = time.localtime(lastmod_seconds)
# convert time tuple to MM/DD/YYYY HH:MM:SS format
file_date = time.strftime("%m/%d/%y %H:%M:%S", lastmod_tuple)
print "%-40s %s" % (file_name, file_date)