in reply to Renaming files in dir
And I suspect your problems could be related that you don't give a full path for both arguments of move, but to just one. Maybe, instead of prepending "$path/" in front of the file name everywhere, you could chdir to $path first, and then you can use relative paths, i.e. just use the bare file basename.
A possible second reason for trouble is that the characters you're trying to change are not in Ascii. Under the hood, (western) Windows uses 2 character sets: CP1252, Microsoft's extension to Latin-1, for the GUI, and an old DOS compatible code page (4 hundred something?) for the console — and maybe for the filesystem, too. Just try to run a script like
in the console, and you'll see what I mean. If that is indeed a problem, you'll have to find out the character code of the characters you're trying to change.print "ä\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Renaming files in dir
by larus (Acolyte) on Mar 19, 2009 at 08:57 UTC | |
by bart (Canon) on Mar 19, 2009 at 09:16 UTC |