in reply to Re: Re^3: Rename problem
in thread Rename problem

The next step would be to try renaming it to something specific to try and narrow down the problem to something reproducible. For example:
rename("archive.txt","test.shtml");
Now, if that ended up with a file named "test", this would be very peculiar.

Now, instead of using the rename function, try using any command-line tool you have available. There might be something wrong with your filename.

Windows is, despite appearances, still very much DOS when it comes to certain things. In particular, you should not have filenames that are: There's others, but you get the idea. These are device names, all left over from CP/M.

Maybe you're trying to rename to "con.shtml" and it goes all screwy?

Replies are listed 'Best First'.
Re: Re^5: Rename problem
by Anonymous Monk on Nov 23, 2002 at 04:34 UTC
    Thanks for your help. The solution turned out to be: my $the_old_title = "$old_title"."\.shtml"; rename("archive.txt","$the_old_title");