copying files through Python
petercable at gmail.com
petercable at gmail.com
Sat Feb 16 13:24:30 EST 2008
On Feb 16, 6:21 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>
> Please use a mailer/news-agent that preserves whitespace on the
> beginning of the line, and make sure you don't use tabs but spaces to
> indent.
>
> Apart from that - why don't you use shutil.copytree? Regarding the error
> - are you allowed to copy, can you do it using the shell?
>
> Diez
OP stated requirements were to move all the files into a single
folder. Copytree will preserve the directory structure from the source
side of the copy operation.
Lalit Krishna schrieb:
> Hi this is the code which I wrote till now. It is giving permission
> denied error for sub folders of source directory. Does anyone have any
> idea what is going wrong
Python isn't going to let you get around operating system access
controls. Check the permissions on the source directories...
Pete
More information about the Python-list
mailing list