Re: Copying non-existing files, was Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without over

2014-05-21 Thread Satish ML
On Wednesday, May 21, 2014 2:42:49 PM UTC+5:30, Peter Otten wrote: > Satish ML wrote: [Regarding subject: let's see if we can trigger a buffer > overflow somewhere ;)] > On Wednesday, May 21, 2014 6:59:40 AM UTC+5:30, > Rustom Mody wrote: >> On Tuesday, May 20, 2014 9:35:10 PM UTC+5:30, Jagadeesh

Copying non-existing files, was Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwrit

2014-05-21 Thread Peter Otten
Satish ML wrote: [Regarding subject: let's see if we can trigger a buffer overflow somewhere ;)] > On Wednesday, May 21, 2014 6:59:40 AM UTC+5:30, Rustom Mody wrote: >> On Tuesday, May 20, 2014 9:35:10 PM UTC+5:30, Jagadeesh N. Malakannavar >> wrote: > Hi Satish, > > Can you please send python p

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-21 Thread Satish ML
On Wednesday, May 21, 2014 6:59:40 AM UTC+5:30, Rustom Mody wrote: > On Tuesday, May 20, 2014 9:35:10 PM UTC+5:30, Jagadeesh N. Malakannavar > wrote: > Hi Satish, > > Can you please send python part in plain text format? > Python code here is > > difficult to read. It would be helpful to read >

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Rustom Mody
On Tuesday, May 20, 2014 9:35:10 PM UTC+5:30, Jagadeesh N. Malakannavar wrote: > Hi Satish, > > Can you please send python part in plain text format? Python code here is > > difficult to read. It would be helpful to read https://wiki.python.org/moin/GoogleGroupsPython#Posting_from_Google_Group

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Jagadeesh Malakannavar
Hi Satish, Can you please send python part in plain text format? Python code here is difficult to read. Thanks On Tue, 20 May 2014, Satish ML wrote: | On Tuesday, May 20, 2014 5:54:47 PM UTC+5:30, Satish ML wrote: | > On Tuesday, May 20, 2014 5:51:19 PM UTC+5:30, Satish ML wrote: > On Tuesday

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread alister
On Tue, 20 May 2014 05:28:09 -0700, Satish ML wrote: > On Tuesday, May 20, 2014 5:54:47 PM UTC+5:30, Satish ML wrote: >> On Tuesday, May 20, 2014 5:51:19 PM UTC+5:30, Satish ML wrote: > On >> Tuesday, May 20, 2014 11:27:01 AM UTC+5:30, Rustom Mody wrote: > On >> Monday, May 19, 2014 2:32:36 PM UTC

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Satish ML
On Tuesday, May 20, 2014 5:54:47 PM UTC+5:30, Satish ML wrote: > On Tuesday, May 20, 2014 5:51:19 PM UTC+5:30, Satish ML wrote: > On Tuesday, > May 20, 2014 11:27:01 AM UTC+5:30, Rustom Mody wrote: > On Monday, May 19, > 2014 2:32:36 PM UTC+5:30, Satish ML wrote: > On Monday, May 19, 2014 12:31:0

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Satish ML
On Tuesday, May 20, 2014 5:51:19 PM UTC+5:30, Satish ML wrote: > On Tuesday, May 20, 2014 11:27:01 AM UTC+5:30, Rustom Mody wrote: > On > Monday, May 19, 2014 2:32:36 PM UTC+5:30, Satish ML wrote: > On Monday, May > 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > > On Mon, May 19, 2014 >

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Satish ML
On Tuesday, May 20, 2014 11:27:01 AM UTC+5:30, Rustom Mody wrote: > On Monday, May 19, 2014 2:32:36 PM UTC+5:30, Satish ML wrote: > On Monday, > May 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > > On Mon, May 19, > 2014 at 4:53 PM, wrote: > Could you kindly help? Sure. Either start writi

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-20 Thread Satish ML
On Tuesday, May 20, 2014 5:51:19 PM UTC+5:30, Satish ML wrote: > On Tuesday, May 20, 2014 11:27:01 AM UTC+5:30, Rustom Mody wrote: > On > Monday, May 19, 2014 2:32:36 PM UTC+5:30, Satish ML wrote: > On Monday, May > 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > > On Mon, May 19, 2014 >

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-19 Thread Rustom Mody
On Monday, May 19, 2014 2:32:36 PM UTC+5:30, Satish ML wrote: > On Monday, May 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > > On Mon, May 19, 2014 at 4:53 PM, wrote: > Could you kindly help? Sure. Either start writing code and then post when you > have problems, or investigate some shel

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-19 Thread Satish ML
On Monday, May 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > On Mon, May 19, 2014 at 4:53 PM, wrote: > Could > you kindly help? Sure. Either start writing code and then post when you have > problems, or investigate some shell commands (xcopy in Windows, cp in Linux, > maybe scp) that c

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-19 Thread Satish ML
On Monday, May 19, 2014 12:31:05 PM UTC+5:30, Chris Angelico wrote: > On Mon, May 19, 2014 at 4:53 PM, wrote: > Could > you kindly help? Sure. Either start writing code and then post when you have > problems, or investigate some shell commands (xcopy in Windows, cp in Linux, > maybe scp) that c

Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of sa

2014-05-19 Thread Chris Angelico
On Mon, May 19, 2014 at 4:53 PM, wrote: > Could you kindly help? Sure. Either start writing code and then post when you have problems, or investigate some shell commands (xcopy in Windows, cp in Linux, maybe scp) that can probably do the whole job. Or pay someone to do the job for you. ChrisA

Re: Copying files in directory

2008-12-16 Thread ianaré
On Dec 15, 9:49 pm, pacsciad...@gmail.com wrote: > I'm writing a project management system, and I need the ability to > accept a directory name and move its contents to another directory. > Can someone give me a code sample that will handle this? I can't find > any "copying" functions in os or os.p

Re: Copying files in directory

2008-12-15 Thread James Mills
On Tue, Dec 16, 2008 at 12:49 PM, wrote: > I'm writing a project management system, and I need the ability to > accept a directory name and move its contents to another directory. > Can someone give me a code sample that will handle this? I can't find > any "copying" functions in os or os.path.

Re: copying files through Python

2008-02-16 Thread Tim Chase
> 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,

Re: copying files through Python

2008-02-16 Thread [EMAIL PROTECTED]
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

Re: copying files through Python

2008-02-16 Thread Diez B. Roggisch
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

Re: copying files through Python

2008-02-16 Thread Lalit Krishna
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)

Re: copying files through Python

2008-02-15 Thread Jeff Schwab
[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

Re: copying files through Python

2008-02-15 Thread James Matthews
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

Re: copying files through Python

2008-02-15 Thread [EMAIL PROTECTED]
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

Re: copying files through Python

2008-02-13 Thread Larry Bates
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

Re: copying files through Python

2008-02-13 Thread Tim Chase
> 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

RE: copying files

2007-08-29 Thread Carsten Haese
On Wed, 2007-08-29 at 17:03 -0400, Brian McCann wrote: > what do the + signs do? Start here: http://docs.python.org/tut/ -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: copying files

2007-08-29 Thread Ricardo Aráoz
t;- This is NOT what you want. > > ____________ > > From: Ricardo Aráoz [mailto:[EMAIL PROTECTED] > Sent: Wed 8/29/2007 2:51 PM > To: Brian McCann > Cc: python-list@python.org > Subject: Re: copying files > > > > Brian McCann wrote: >&g

RE: copying files

2007-08-29 Thread Brian McCann
<mailto:[EMAIL PROTECTED]> Hi Ricardo, what do the + signs do? From: Ricardo Aráoz [mailto:[EMAIL PROTECTED] Sent: Wed 8/29/2007 2:51 PM To: Brian McCann Cc: python-list@python.org Subject: Re: copying files Brian McCann wrote: > Hi, > >

Re: copying files

2007-08-29 Thread kyosohma
On Aug 29, 1:51 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Brian McCann wrote: > > Hi, > > > with the code below I set a variable TEST_HOME to a path and the > > variable m to a path > > in my current dir. > > I have a symbolic link setting m>lib > > when I run the script I get no errors an

Re: copying files

2007-08-29 Thread Ricardo Aráoz
Brian McCann wrote: > Hi, > > with the code below I set a variable TEST_HOME to a path and the > variable m to a path > in my current dir. > I have a symbolic link setting m>lib > when I run the script I get no errors and the lib dir with its 20 files > does not get copied to /v01/test_home >

Re: copying files

2007-08-29 Thread Ricardo Aráoz
Brian McCann wrote: > Hi, > > with the code below I set a variable TEST_HOME to a path and the > variable m to a path > in my current dir. > I have a symbolic link setting m>lib > when I run the script I get no errors and the lib dir with its 20 files > does not get copied to /v01/test_home >

RE: copying files

2007-08-29 Thread Brian McCann
one thing I just noticed is that when I run the script I get a new symbolic link created in my current dir TEST_HOME-->lib --Brian From: [EMAIL PROTECTED] on behalf of Brian McCann Sent: Wed 8/29/2007 2:40 PM To: python-list@py

Re: copying files into one

2006-05-14 Thread Gary Wessle
thanks, I was able 'using pdb' to fix the problem as per Edward's suggestion. -- http://mail.python.org/mailman/listinfo/python-list

Re: copying files into one

2006-05-14 Thread Ten
On Sunday 14 May 2006 05:09, Gary Wessle wrote: > Hi > > I am looping through a directory and appending all the files in one > huge file, the codes below should give the same end results but are > not, I don't understand why the first code is not doing it. > > thanks > Hi there - I think you might

Re: copying files into one

2006-05-13 Thread Edward Elliott
Gary Wessle wrote: > I am looping through a directory and appending all the files in one > huge file, the codes below should give the same end results but are > not, I don't understand why the first code is not doing it. another bit of friendly advice (for others as well): learn to use pdb before

Re: copying files into one

2006-05-13 Thread Edward Elliott
Gary Wessle wrote: > I am looping through a directory and appending all the files in one > huge file, the codes below should give the same end results but are > not, I don't understand why the first code is not doing it. > > combined = open(outputFile, 'wb') > for name in flist: > if os.path.

Re: Copying files between different linux machines

2006-01-09 Thread malv
Sorry, the above link should read: http://shfs.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying files between different linux machines

2006-01-08 Thread malv
Best is shfs. This uses the safety of ssh and allows you to mount filesystems on an external computer locally with commands like mount & umount: shfsmount & shfsumount. http://shfs.sourceforge.net/ malv -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying files between different linux machines

2006-01-07 Thread Mike Meyer
"Thierry Lam" <[EMAIL PROTECTED]> writes: > Let's say I have two linux machines with the following names: > -linone > -lintwo > > If I'm currently on linone and if I want to copy a bunch of files from > lintwo into linone, how can that be done in a python script without > using ftp? Use scp.

Re: Copying files between different linux machines

2006-01-07 Thread selffrag
I'll presume you have ssh, scp on both boxes $ man ssh $ man scp $scp mydata.dat [EMAIL PROTECTED]:mydata.dat -- http://mail.python.org/mailman/listinfo/python-list