|
@@ -1,5 +1,6 @@
|
|
from conf import PathConfig
|
|
from conf import PathConfig
|
|
import os
|
|
import os
|
|
|
|
+import shutil
|
|
|
|
|
|
|
|
|
|
class Automate:
|
|
class Automate:
|
|
@@ -8,10 +9,10 @@ class Automate:
|
|
files = []
|
|
files = []
|
|
|
|
|
|
def Init(self):
|
|
def Init(self):
|
|
- Path = PathConfig( );
|
|
|
|
|
|
+ Path = PathConfig( )
|
|
FolderPaths = []
|
|
FolderPaths = []
|
|
- Path.SetPath( );
|
|
|
|
- FolderPaths = Path.getPath( );
|
|
|
|
|
|
+ Path.SetPath( )
|
|
|
|
+ FolderPaths = Path.getPath( )
|
|
return FolderPaths
|
|
return FolderPaths
|
|
# print (FolderPaths)
|
|
# print (FolderPaths)
|
|
|
|
|
|
@@ -19,3 +20,12 @@ class Automate:
|
|
for file in os.listdir( paths[0] ):
|
|
for file in os.listdir( paths[0] ):
|
|
Automate.files.append( file )
|
|
Automate.files.append( file )
|
|
return Automate.files
|
|
return Automate.files
|
|
|
|
+
|
|
|
|
+ def copyFiles(self, paths):
|
|
|
|
+ for file in os.listdir( paths[0] ):
|
|
|
|
+ print ("File being moved -----> " + file)
|
|
|
|
+ full_file_name = os.path.join( paths[0], file )
|
|
|
|
+ if os.path.isfile(full_file_name):
|
|
|
|
+ shutil.move( full_file_name, paths[1] )
|
|
|
|
+
|
|
|
|
+ #shutil.copy( full_file_name, paths[1] )
|