RSS Forums RSS
Please support our Python advertiser: Programming Forums
Views: 3437 | Replies: 3
Reply
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
shanenin shanenin is offline Offline
Posting Whiz in Training

copy a file

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: copy a file

  #2  
Jul 17th, 2005
the shutil module seems to be what I needed.
shutil.copy(file,destination)
Reply With Quote  
Join Date: Oct 2004
Posts: 2,546
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 11
Solved Threads: 178
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Solution Re: copy a file

  #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  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: copy a file

  #4  
Jul 17th, 2005
thank you for the suggestion :-)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:49 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC