Aug-28-2019, 03:35 PM
Hi
I want to copy tif files contained in subfolders of folder "U:\\collections\\2019_input\\" in one separated output folder "U:\\collections\\2019_output\\" (no subfolders needed in the output).
My code :
Any idea?
Thanks !

I want to copy tif files contained in subfolders of folder "U:\\collections\\2019_input\\" in one separated output folder "U:\\collections\\2019_output\\" (no subfolders needed in the output).
My code :
input = "U:\\collections\\2019_input\\" output = "U:\\collections\\2019_output\\" for dirpath, dirnames, filenames in os.walk(input): for filename in filenames: if filename.endswith(".tif"): shutil.copy2(filename, output)But it seems that shutil.copy2 command does not find the file to be copied.
Any idea?
Thanks !