Roy Hinkelman dixit:
> Why don't you simply print out fname? This should point you to the error.
>
> Denis
>
>
> I did here:
> > if fname == old_name:
> > print fname # test
>
> and it looks correct.
>
> On an WinXP, should I use shutil instead?
>
> Roy
Sorry Roy, I rea
On Tue, 2009-12-08 at 14:55 -0800, Roy Hinkelman wrote:
> shutil.copy2(_files_to_mod + "\\" + fname, _files_to_mod + "\\" +
> new_name)
You can make os.path.join sort out the directory seprator for you. It
will add a / under linux and \ under windows.
>>> os.path.join('Testing dir','oldname dir',
I got it.
Switched to shutil and made to paths complete paths. The added benefit is
that it didn't trash the original file.
shutil.copy2(_files_to_mod + "\\" + fname, _files_to_mod + "\\" + new_name)
Thanks.
-- Forwarded message --
From: Roy Hinkelman
Date: Tue, Dec 8, 2009 at
Why don't you simply print out fname? This should point you to the error.
Denis
I did here:
> if fname == old_name:
> print fname # test
and it looks correct.
On an WinXP, should I use shutil instead?
Roy
___
Tutor maillist - T