A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/090043.html below:

using os module to copy files on windows

using os module to copy files on windows using os module to copy files on windowsSteve Holden sholden at holdenweb.com
Tue Apr 10 15:49:32 EDT 2001
"Christian Reyes" <christian at rocketnetwork.com> wrote in message
news:9avnkk$23$1 at bob.news.rcn.net...
> Hello,
> I've been using the os.system() call to copy files using the dos cmd line
in
> my python scripts.
> for instance.
>
> os.system('xcopy d:\\folder\\* d:\\folder2\\')
>
> this does the job fine, but i'd like to eradicate all dependencies on the
> cmd line from my scripts.
>
> Is there a python os method that is equivalent to this?
>
Take a look at the shutil module. With the caveat that Macintosh resource
forks will be lost, this appears to be a portable equivalent of your sample
code.

regards
 Steve




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4