Created
April 13, 2014 14:32
-
-
Save theharshbhatia/10586570 to your computer and use it in GitHub Desktop.
Revisions
-
theharshbhatia created this gist
Apr 13, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import os,datetime import os.path, time from os.path import join, getsize ct=datetime.datetime.now() #current time # folderpath="/Users/harshbhatia/Desktop/buyingiq/" #folderpath you want to check for modified files #pushd \\fileserver\Study Material ||all materials go to z drive atomatically folderpath="/Volumes/Study Material/Computer Science & IT/Even Sem 2014/" print "NOTLOG for Mac\n" print "Choose Your Directory" numofdays=int(raw_input("Please enter days of your absence(eg. 2 ): \n")) # numofdays=2 #num of days since users havent checked the folder print ct; for root, dirs, files in os.walk(folderpath): for name in files: tm= (os.path.getmtime(join(root,name))) tm1= (datetime.datetime.fromtimestamp(tm)) tdelta= ct-tm1 if int(tdelta.days)<=numofdays: print join(root,name)