> 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.
well, it would be "copying [not moving] files through Python",
but if the desire is to flatten the tree into a single directory,
On Feb 16, 6:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> 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
> - ar
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
>
> import os
> import shutil
> def copytreetosinglefolder(src, dst):
> names = os.listdir(src)
> if (o
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
import os
import shutil
def copytreetosinglefolder(src, dst):
names = os.listdir(src)
if (os.path.isdir(dst)==False):
os.mkdir(dst)
[EMAIL PROTECTED] wrote:
> On Feb 13, 10:50 pm, Lalit <[EMAIL PROTECTED]> wrote:
>
>> I need to write a program which would transfer files under one folder
>> structure (there are sub folders) to single folder.
>
>
>
> find /fromdir -exec mv {} /todir \; -print
>
>
-type f
--
http://mail.py
Basically copying a file is reading a character or string from one file and
writing it to the other.
On Fri, Feb 15, 2008 at 3:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> On Feb 13, 10:50 pm, Lalit <[EMAIL PROTECTED]> wrote:
>
> > I need to write a program which would transfer files und
On Feb 13, 10:50 pm, Lalit <[EMAIL PROTECTED]> wrote:
> I need to write a program which would transfer files under one folder
> structure (there are sub folders) to single folder.
find /fromdir -exec mv {} /todir \; -print
Pete
--
http://mail.python.org/mailman/listinfo/python-list
Lalit wrote:
> I am new to python. Infact started yesterday and feeling out of place.
> I need to write a program which would transfer files under one folder
> structure (there are sub folders) to single folder. Can anyone give me
> some idea like which library files or commands would be suitable f
> I am new to python. Infact started yesterday and feeling out of place.
> I need to write a program which would transfer files under one folder
> structure (there are sub folders) to single folder. Can anyone give me
> some idea like which library files or commands would be suitable for
> this fil
I am new to python. Infact started yesterday and feeling out of place.
I need to write a program which would transfer files under one folder
structure (there are sub folders) to single folder. Can anyone give me
some idea like which library files or commands would be suitable for
this file transfer
10 matches
Mail list logo