Hi guyz,
I have been trying to write a script to search for files with multiple extensions (.txt, .odt, .bat, .Fvl etc )in a directory , i tried using (path/*.*) but it still doesn't work for me.
here is the script i have written .Kindly go through it and point out any errors or mistakes in the script suggesting how to do it better.
thanks in advance.
Regards ,
Pyte
!#usr/bin/python
import os, datetime
Path = "/home/pytbyte/Documents/kim.doc" # this works fine but ("/home/pytbyte/Documents/*.*") doesn't
last_modified = datetime.datetime.fromtimestamp(os.path.getmtime(Path))
print "last_modified:", last_modified
if datetime.datetime.now() - last_modified > datetime.timedelta(hours=50):
print "too old! "