On 24/11/11 15:26, Brett Parker wrote:
On 24 Nov 14:43, Chris Walker wrote:
I have a directory full of files and sub-directories which I've pulled from an emulator. But it has extra filename extensions on it. I would like to traverse this directory, stripping off the extensions and so I've been trying to write a script to do it but it's failing.
You'll want to be typing "man rename", rename is in the main perl package, so it's very likely you've got it installed (assuming debian or ubuntu, as I usually do!).
Been there, done that, fallen at the first hurdle.
I'm running Mandriva 2011.0, not that makes any difference.
If I run this :- rename -n “s/.jpg/.;1/” *
It fails with bash: 1/”: No such file or directory
I'll have a try at Mark's suggestion now.