Re: shutil.move has a mind of its own

2005-01-12 Thread Steve Holden
Daniel Bickett wrote: Hello, I'm writing an application in my pastime that moves files around to achieve various ends -- the specifics aren't particularly important. The shutil module was chosen as the means simply because that is what google and chm searches returned most often. My problem has to

Re: shutil.move has a mind of its own

2005-01-12 Thread Istvan Albert
Daniel Bickett wrote: In my script, rather than a file being moved to the desired location, it is, rather, moved to the current working directory (in this case, my desktop -- without any exceptions, mind you). As it happens, the what is the output generated by the lines: fdir, fname = randFileInfo.

Re: shutil.move has a mind of its own

2005-01-11 Thread Michael Hoffman
Daniel Bickett wrote: As it happens, the desired locations are system folders (running windows xp, the folders are as follows: C:\WINDOWS, C:\WINDOWS\SYSTEM, C:\WINDOWS\SYSTEM32). To see if this factor was causing the problem, I tried it using the interpreter, and found it to be flawless. I'm not e

Re: shutil.move has a mind of its own

2005-01-11 Thread Daniel Bickett
Don wrote: > I don't know if this is the problem or, not, but: > [snip] As I said, that was simply an error when typing the example, and it is not present in my code. See below. Neil Benn wrote: > >Oh, I'm sorry, that was my mistake. The example contained that error, > >but my code does not. > >

Re: shutil.move has a mind of its own

2005-01-11 Thread Don
I don't know if this is the problem or, not, but: shutil.move( "C:\omg.txt" , "C:\folder\subdir" ) Needs to have some special handling for the backslashes. Either: shutil.move( r"C:\omg.txt" , r"C:\folder\subdir" ) or: shutil.move( "C:\\omg.txt" , "C:\\folder\\subdir" ) -Don Daniel Bicket

Re: shutil.move has a mind of its own

2005-01-11 Thread Neil Benn
Daniel Bickett wrote: Oh, I'm sorry, that was my mistake. The example contained that error, but my code does not. Daniel Bickett To be fair though - I would have expected the method to throw an error rather than default to cwd. Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioI

Re: shutil.move has a mind of its own

2005-01-11 Thread Daniel Bickett
Oh, I'm sorry, that was my mistake. The example contained that error, but my code does not. Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

Re: shutil.move has a mind of its own

2005-01-10 Thread drs
"Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Daniel Bickett wrote: > > shutil.move( "C:\omg.txt" , "C:\folder\subdir" ) ^ ^^ ^ > The problem is that backslash is the escape character. In particular, > '\f' is

RE: shutil.move has a mind of its own

2005-01-10 Thread Delaney, Timothy C (Timothy)
Daniel Bickett wrote: > shutil.move( "C:\omg.txt" , "C:\folder\subdir" ) ^ ^^ ^ The problem is that backslash is the escape character. In particular, '\f' is a form feed. >>> '\o' '\\o' >>> '\f' '\x0c' >>> '\s' '\\s' Notice how for '\o' and '\s' it doub

shutil.move has a mind of its own

2005-01-10 Thread Daniel Bickett
Hello, I'm writing an application in my pastime that moves files around to achieve various ends -- the specifics aren't particularly important. The shutil module was chosen as the means simply because that is what google and chm searches returned most often. My problem has to do with shutil.move