Tom wrote:
> Peter Hansen wrote:
>> Where do you think those double quotation marks came from? What
>> happens if you try the following instead of using the variables you
>> were trying to use?
>>
>> os.rename("e:\\music\\Joni Mitchell\\ogg-8",
>> "e:\\music.ogg\\Joni Mitchell\\ogg-8")
>>
>
Peter Hansen wrote:
> Tom wrote:
>
>>Drive E: is removable, so I was careful to verify that that was a factor
>>in the problem.
>>
>>Yes, I can do the same renaming, with the same drive, at the command line.
>>
>>I think I put the emphasis in the wrong place in my question. This
>>isn't really
Tom wrote:
> Drive E: is removable, so I was careful to verify that that was a factor
> in the problem.
>
> Yes, I can do the same renaming, with the same drive, at the command line.
>
> I think I put the emphasis in the wrong place in my question. This
> isn't really about os.rename(). It is
Yes, I am sure about those things.
I've tried shutil.move and got the same result.
Forward slash? I'll give that a try and report back here if it works.
Thanks,
Tom.
Larry Bates wrote:
> Are you sure the source directory exists and you
> have rights to rename it? Because the rename works
> for
Peter Hansen wrote:
> Tom wrote:
>
>>I'm having a problem using a path with spaces as a parameter to
>>os.rename() in a program on WinXP.
>>
>>This works fine at the command line (where the folder "c:\aa bb" exists)
>>
>> > os.rename( "c\aa bb", "c:\cc dd" );
>> >
>>
>>But, I can't get it to work
Tom wrote:
> I'm having a problem using a path with spaces as a parameter to
> os.rename() in a program on WinXP.
>
> This works fine at the command line (where the folder "c:\aa bb" exists)
>
> > os.rename( "c\aa bb", "c:\cc dd" );
> >
>
> But, I can't get it to work in my program, eg.
>
>
Are you sure the source directory exists and you
have rights to rename it? Because the rename works
for me.
But you may want to look at shutil.move and/or
use forward slashes (they work under Windows)
-Larry Bates
Tom wrote:
> I'm having a problem using a path with spaces as a parameter to
> o
I'm having a problem using a path with spaces as a parameter to
os.rename() in a program on WinXP.
This works fine at the command line (where the folder "c:\aa bb" exists)
> os.rename( "c\aa bb", "c:\cc dd" );
>
But, I can't get it to work in my program, eg.
print SrcDir
print NewDir
os.rena