automate.py 650 B

12345678910111213141516171819202122232425
  1. from conf import PathConfig
  2. import os
  3. import shutil
  4. class Automate:
  5. 'Initialization Class for Automation'
  6. def Init(self):
  7. Path = PathConfig( )
  8. Path.SetPath()
  9. def GetFiles(self, paths):
  10. files = []
  11. for file in os.listdir( paths ):
  12. files.append( file )
  13. return files
  14. def copyFiles(self, src_folder,dest_folder):
  15. for file in os.listdir( src_folder ):
  16. print ("File being moved -----> " + file)
  17. full_file_name = os.path.join( src_folder, file )
  18. if os.path.isfile(full_file_name):
  19. shutil.move( full_file_name, dest_folder )