Copying Huge Files ? (Newbie!)
da at ski.org
Thu Aug 12 20:35:12 CEST 1999
On Thu, 12 Aug 1999, Fredrik Henbjork wrote:
> On Thu, 12 Aug 1999, you wrote:
> > I want to copy some files across the disks of my server using python
> > parse a script and then do what I want.
> > But while reading the manual I cannot find something like os.copyfile
> > or os.movefile.
> > Are there some functions except open/read/write that can do the copy
> > for me ???
> > Ciao
> > Matthias Barmeier
> Take a look at the things in shutil (especially shutil.copy and
> shutil.copyfile) and os (especially os.rename and os.renames).
I'd like to point out that especially if the files are indeed huge, then
the operating system file copy operations may be *much* more efficient
than shutil.copy*, e.g. by using mmap when appropriate.
os.system() can be your friend...
More information about the Python-list