I got it.<br><br>Switched to shutil and made to paths complete paths. The added benefit is that it didn't trash the original file.<br><br>shutil.copy2(_files_to_mod + "\\" + fname, _files_to_mod + "\\" + new_name)<br>
<br>Thanks.<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Roy Hinkelman</b> <span dir="ltr"><<a href="mailto:royhink@gmail.com">royhink@gmail.com</a>></span><br>
Date: Tue, Dec 8, 2009 at 12:27 PM<br>Subject: Re: File renaming using os.rename problem (spir)<br>To: <a href="mailto:tutor@python.org">tutor@python.org</a><br><br><br><br><div class="gmail_quote">
<br>
Why don't you simply print out fname? This should point you to the error.<br>
<br>
Denis<br>
<br>
<br>I did here:<br>
> if fname == old_name:<br>
> print fname # test<br>
<br>
and it looks correct.<br><br>On an WinXP, should I use shutil instead?<br><br>Roy<br></div>
</div><br>