I have a source folder which contains both a couple of sub-folders (containing files as well) and a number of files.
-SOURCE_FOLDER
-Sub_Folder_A
-File_AA
-File_AB
- ...
- ...
-Sub_Folder_B
-File_BA
-File_BB
- ...
- ...
-FILE_A
-FILE_B
- ...
- ...
The destination folder I would like to copy the content of the source folder to is already existing.
-DESTINATION_FOLDER
The code as below gave me IOError: [Errno 13] Permission denied
:.
for outputFile in SOURCE_FOLDER:
shutil.copy(outputFile, DESTINATION_FOLDER)
How can I achieve folder and file copy by shutil?