copy a file

Thread Solved

Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

copy a file

 
0
  #1
Jul 17th, 2005
I have been reading through the "python library reference" with no luck finding the module needed to copy a file. Any help would be appreciated.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: copy a file

 
0
  #2
Jul 17th, 2005
the shutil module seems to be what I needed.
shutil.copy(file,destination)
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,971
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 920
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: copy a file

 
0
  #3
Jul 17th, 2005
For file copy shutil.copy2( sourcefile, destinationfile)
is preferred, since it retains the last access time and last modification time of the file.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: copy a file

 
0
  #4
Jul 17th, 2005
thank you for the suggestion :-)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC