Just a thought: Under which user do you run the script? Are there Spaces in the filename?
In reply to Re: Renaming a file by matze77 in thread Renaming a file by g_speran