hi everybody, please help me
i have function, it find the file and copy to new folder.
i don't understand
i have function, it find the file and copy to new folder.
def BKZ(folder): print("Searching.............") listFiles = [] for dirpath,dirfolder,files in os.walk(folder): for f in files: if f.endswith(".pdf") or f.endswith(".docx") or f.endswith(".doc"): listFiles.append(os.path.join(dirpath,f)) # create temp folder serverPath = os.path.join(os.getcwd(),"zip") os.makedirs(serverPath,exist_ok=True) for address in listFiles: # copy all searched file to temp folder shutil.copy(address,serverPath) print("Done!")if i create folder zip in my project folder and i create folder zip in different folder, then give different results? each folder zip give FileNotFoundError: No such file or directory with different files
i don't understand
