how to get os.system () call to cooperate on Windows

Anthra Norell anthra.norell at bluewin.ch
Mon Oct 26 06:00:39 EDT 2009


I have a Python program that needs to copy files around. I could read 
and write which would be inefficient and would time-stamp the copy. The 
module "os" has lots of operating system functions, but none that copies 
files I could make out reading the doc twice. The function "os.system 
('copy file_name directory_name')" turns out doesn't do anything except 
flashing a DOS command window for half a second. So my question is: How 
can one copy files on the OS level?
   This simple question would surely have been asked many times before. 
Not to impose on anyone's patience I expect it can be answered between 
two sips of coffee.

Thanks very much

Frederic




More information about the Python-list mailing list