1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
from ftplib import FTP
import ftplib
import os
import errno
import time
class ProcessFile:
path= "FolderFiles"
target=" /var/www/folder/Output"
extract=""
monitoring=""
bash="unrar "
@staticmethod
def returnPath():
pathFiles= []
for root, dirs, files in os.walk(ProcessFile.path, topdown=True):
for name in dirs:
os.path.join(root, name)
for name in files:
pathFiles= os.path.join(root, name)
print(pathFiles)
return pathFiles
@staticmethod
def testArchive(pathFile):
monitoring = ProcessFile.bash+"t "+pathFile
verifyFiles = os.system(monitoring)
return verifyFiles
def testCodeRetour():
myPath = ProcessFile.returnPath()
print(myPath) |
Partager