On Wed, 3 Apr 2019 at 16:06, Skip Montanaro wrote:
>
> > From a brief look at the docs, there's an on_copy callback to copy_fs.
> > Maybe you could use the getinfo/setinfo methods to copy over the
> > timestamps and any other file metadata that you want in that callback?
>
> Yes, I had gotten to t
> From a brief look at the docs, there's an on_copy callback to copy_fs.
> Maybe you could use the getinfo/setinfo methods to copy over the
> timestamps and any other file metadata that you want in that callback?
Yes, I had gotten to that point when I first posted to the
PyFilesystem Google Group.
On Wed, 3 Apr 2019 at 14:55, Skip Montanaro wrote:
> It's part of a larger application which needs to copy files from a number
> of locations, not all of which are filesystems on local or remote hosts
> (think zip archives, s3 buckets, tar files, etc). In that application, I am
> using the fs pack
>
> Is there an (unstated) reason why you're using Python and not a system
> tool such as rsync?
>
It's part of a larger application which needs to copy files from a number
of locations, not all of which are filesystems on local or remote hosts
(think zip archives, s3 buckets, tar files, etc). In
Skip,
On 3/04/19 8:06 AM, Skip Montanaro wrote:
I posed this yesterday on the PyFilesystem discussion Google Group but
it's so far not even garnered a single view, so perhaps that group is
defunct. I turn to the knowledgeable folks here:
I am copying files from one filesystem instan
I posed this yesterday on the PyFilesystem discussion Google Group but
it's so far not even garnered a single view, so perhaps that group is
defunct. I turn to the knowledgeable folks here:
I am copying files from one filesystem instance to another. I see no
(easy) way to tell fs.copy.copy_
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
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
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
>
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
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
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
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
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
>
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
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
>
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
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
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
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
Hi,
Consider
/src/alias/a.c
/src/alias/b.c
/src/xml/p.xml
/src/xml/c.xml
/src/h.c
as source directory
and
/dest/alias
/dest/xml
/dest
as destination directory. These are given in a csv file like
/src/alias/a.c, /dest/alias
/src/alias/b.c, /dest/alias
/src/xml/p.xml, /dest/xml
/src/xml/c.xml, /de
On Sep 23, 9:44 am, Grant Edwards wrote:
> On 2009-09-23, Jeremy Conlin wrote:
>
> > I am trying to copy a folder hierarchy from one location to another.
> > I can use the shutil.copytree function to copy the folder tree, but I
> > don't want the files copied, just the folders. What is a good wa
On 2009-09-23, Jeremy Conlin wrote:
> I am trying to copy a folder hierarchy from one location to another.
> I can use the shutil.copytree function to copy the folder tree, but I
> don't want the files copied, just the folders. What is a good way to
> approach this?
Just in case there's no real
On Sep 23, 9:31 am, Tim Golden wrote:
> Jeremy Conlin wrote:
> > On Sep 23, 9:15 am, Tim Golden wrote:
> >> Jeremy Conlin wrote:
> >>> I am trying to copy a folder hierarchy from one location to another.
> >>> I can use the shutil.copytree function to copy the folder tree, but I
> >>> don't want
On Sep 23, 9:15 am, dwatrous wrote:
> Have you considered using
> os.walk?http://docs.python.org/library/os.html#os.walk
>
> It won't be completely automated, but I think it should allow you to
> easily walk the directory structure to reproduce it in another
> location.
>
> If the file names/exte
Jeremy Conlin wrote:
> I am trying to copy a folder hierarchy from one location to another.
> I can use the shutil.copytree function to copy the folder tree, but I
> don't want the files copied, just the folders. What is a good way to
> approach this?
The easiest is
def ignore(folder, names):
Jeremy Conlin wrote:
On Sep 23, 9:15 am, Tim Golden wrote:
Jeremy Conlin wrote:
I am trying to copy a folder hierarchy from one location to another.
I can use the shutil.copytree function to copy the folder tree, but I
don't want the files copied, just the folders. What is a good way to
appro
On Sep 23, 9:15 am, Tim Golden wrote:
> Jeremy Conlin wrote:
> > I am trying to copy a folder hierarchy from one location to another.
> > I can use the shutil.copytree function to copy the folder tree, but I
> > don't want the files copied, just the folders. What is a good way to
> > approach thi
le to
use the ignore attribute in the shutil.copytree function to prevent
copying files:
http://docs.python.org/library/shutil.html#shutil.copytree
Daniel
On Sep 23, 9:04 am, Jeremy Conlin wrote:
> I am trying to copy a folder hierarchy from one location to another.
> I can use the shut
Jeremy Conlin wrote:
I am trying to copy a folder hierarchy from one location to another.
I can use the shutil.copytree function to copy the folder tree, but I
don't want the files copied, just the folders. What is a good way to
approach this?
Thanks,
Jeremy
Use os.walk and create the directo
I am trying to copy a folder hierarchy from one location to another.
I can use the shutil.copytree function to copy the folder tree, but I
don't want the files copied, just the folders. What is a good way to
approach this?
Thanks,
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
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.
Regards,
LeafStorm
--
http://mail.python.org/mailma
> 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
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
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
<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,
>
>
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
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
>
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
>
thon-list@python.org
Subject: copying files
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 /v
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
any help would be greatly apprecia
On Apr 3, 9:42 am, "Daniele Varrazzo" <[EMAIL PROTECTED]>
wrote:
> > > > I wish to copy the highest version number of a file from directory \
> > > > \
> > > > \fileserver\D:\scripts to C:\scripts where the file names are of the
> > > > form
>
> > > > filename_MM.NN.SS.zip, where MM, NN, and SS c
> > > I wish to copy the highest version number of a file from directory \
> > > \
> > > \fileserver\D:\scripts to C:\scripts where the file names are of the
> > > form
>
> > > filename_MM.NN.SS.zip, where MM, NN, and SS can be one to three
> > > digits.
>
> > > Example directory:
> > > other.zip
gtb wrote:
> On Apr 3, 8:31 am, [EMAIL PROTECTED] wrote:
>> On Apr 3, 8:21 am, "gtb" <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>
>>
>>
>>
>>> I wish to copy the highest version number of a file from directory \
>>> \
>>> \fileserver\D:\scripts to C:\scripts where the file names are of the
>>> form
>>>
On Apr 3, 8:47 am, "gtb" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 8:31 am, [EMAIL PROTECTED] wrote:
>
>
>
> > On Apr 3, 8:21 am, "gtb" <[EMAIL PROTECTED]> wrote:
>
> > > I wish to copy the highest version number of a file from directory \
> > > \
> > > \fileserver\D:\scripts to C:\scripts where the
On Apr 3, 8:31 am, [EMAIL PROTECTED] wrote:
> On Apr 3, 8:21 am, "gtb" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > I wish to copy the highest version number of a file from directory \
> > \
> > \fileserver\D:\scripts to C:\scripts where the file names are of the
> > form
>
> > filename_MM.NN.SS.
On Apr 3, 8:21 am, "gtb" <[EMAIL PROTECTED]> wrote:
> I wish to copy the highest version number of a file from directory \
> \
> \fileserver\D:\scripts to C:\scripts where the file names are of the
> form
>
> filename_MM.NN.SS.zip, where MM, NN, and SS can be one to three
> digits.
>
> Example di
Just sort them and then select the bottom one from a list by using a
negative indices. I.e.:
list[-1]
Would return the bottom result out of a list
On Apr 3, 2:21 pm, "gtb" <[EMAIL PROTECTED]> wrote:
> I wish to copy the highest version number of a file from directory \
> \
> \fileserver\D:\scr
I wish to copy the highest version number of a file from directory \
\
\fileserver\D:\scripts to C:\scripts where the file names are of the
form
filename_MM.NN.SS.zip, where MM, NN, and SS can be one to three
digits.
Example directory:
other.zip
dx_ver_1.1.63.zip
dx_ver_1.2.01.zip
dx_ver_1.12.7
thanks, I was able 'using pdb' to fix the problem as per Edward's
suggestion.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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.
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
combined = open(outputFile, 'wb')
for name in flist:
if os.path.isdir(file): continu
Sorry, the above link should read:
http://shfs.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
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
"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.
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
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?
Thanks
Thierry
--
http://mail.python.org/mailman/listinfo/python-li
70 matches
Mail list logo