Browse Source

changes merged with Sachins branch

Clindo Devassy K 7 years ago
parent
commit
8d2a84ded3
1 changed files with 4 additions and 3 deletions
  1. 4 3
      PythonScripts/automate.py

+ 4 - 3
PythonScripts/automate.py

@@ -21,7 +21,7 @@ class Automate:
             files.append(file)
         return files
 
-    def copyFiles(self, src_folder,dest_folder):
+    def copyFiles(self, src_folder,dest_folder,added):
         if src_folder == "" or dest_folder == "":
             log.logger.error('Source or Destination Folder does not exists')
             return 0
@@ -30,7 +30,8 @@ class Automate:
             log.logger.error('No files found in src folder')
             return 0
 
-        for file in os.listdir(src_folder):
+        #for file in os.listdir(src_folder):
+        for file in added:
             print ("File being moved -----> " + file)
             full_file_name = os.path.join( src_folder, file )
             if os.path.isfile(full_file_name):
@@ -39,5 +40,5 @@ class Automate:
                 except shutil.Error as e:
                     log.logger.error('Could not copy the files %s',e)
                     return 0
-                return 1
+        return 1