I start in Python and I'm pretty bad in the program in general. Here is my situation:
Here is the tree:
C:\MySoft\MyFolder
C:\Shift
In MyFolder:
AppliCommon
ObjectMetier
Main
In Shift:
AppliCommon
Main
The purpose of the script is to update an application that is done by replacing files. Therefore, I must first save and then replace MyFolder by MyFolder files by folders and files in SHIFT. Note that all files contain several sub-folders and files.
I've done this:
But I have this error:Code:src = r'C:\Shift' dst = r'C:\MySoft\\MyFolder ' for f in os.listdir (src): shutil.copy (os.path.join (src, f), os.path.join (dst, f))
C:\Python26> python.exe "C:\Documents and Settings\Dje\Desktop\depl.py"
Traceback (most recent call last):
File "C:\Documents and Settings\Dje\Desktop\depl.py", line 12, in <module>
shutil.copy (os.path.join (src, f), os.path.join (dst, f))
File "C:\Python26\lib\shutil.py", line 88, in copy
CopyFile (src, dst)
File "C:\Python26\lib\shutil.py", line 52, in CopyFile
fsrc = open (src, 'rb')
IOError: [Err no 13] Permission denied: 'C:\\Update\\Main'
Bookmarks