예제 #1
0
 def fileTrans():
     global file_es, sourceFold
     print("Source: "+sourceFold)
     print("Destination: "+destFold)
 
     for fil_es in os.listdir(sourceFold):
     
         print("last modified: {}" .format(time.ctime(os.path.getmtime(sourceFold+"/"+fil_es))))
         if (time.time() - os.stat(sourceFold+"/"+fil_es).st_mtime)/(60*60) < 24:
             shutil.move(sourceFold+"/"+fil_es,destFold)
 
     #Invoking message box
     messagebox.showinfo(title ="File Transfer Info",message = "File Transfer Successful")
     
     #calling database
     db_tab.update_tab()
예제 #2
0
 def fileTrans(self, event):
     global file_es, sourceFold
     print("Source: "+sourceFold)
     print("Destination: "+destFold)
     
     for fil_es in os.listdir(sourceFold):
         
         print "last modified: %s" % time.ctime(os.path.getmtime(sourceFold+"/"+fil_es))
         if (time.time() - os.stat(sourceFold+"/"+fil_es).st_mtime)/(60*60) < 24:
                 shutil.move(sourceFold+"/"+fil_es,destFold)
     #update_tab()
     #Invoking message box
     dlg1 = wx.MessageDialog(self, "File Transfer Successful",'Title',wx.OK)
     dlg1.ShowModal()
     dlg1.Destroy()
     #calling database
     db_tab.update_tab()