Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Copy Question

Status
Not open for further replies.

StacyTech

Technical User
Oct 28, 2003
8
US
Hi,

I'm new to Python (about 2 weeks) and I want to use the shutil module to copy files from Windows XP folders to my jump drive. My problem is that I can't figure out how to make Python deal with the spaces in Windows folder and file names. I tried putting the path in quotes (like you do at a DOS prompt) but still no good. I searched python.org and can't find an answer....any ideas?

Thanks!

Stacy :)
 
I figured out what the problem was...the folders and file names are case-sensitive! Once I changed documents and settings...blah blah blah to Documents and Settings blah blah blah it worked just fine. I'm doing some computer migrations at work and I wanted to write a frozen binary to copy all the important files automatically to my jump drive for transfer to the new PC. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top