Aug-11-2018, 01:44 PM
I am trying to copy content of folder to existing folder
using following code and got 'PermissionError: [error 13] permission denied : 'c:/WINDOWS/System32'
the program is run under administrator
using following code and got 'PermissionError: [error 13] permission denied : 'c:/WINDOWS/System32'
the program is run under administrator
import shutil import os programSourcePath = "C:\Users\Admin\Desktop\Utilities_Installers_new\Programs" pstoolfiles = os.listdir(programSourcePath + '/PSTools') for name in pstoolfiles: srcname = os.path.join(programSourcePath + '/PSTools', name) dstname = os.path.join(r'c:/WINDOWS/System32', name) shutil.copyfile(srcname, dstname)Thanks,