[Gllug] Mass renaming of files

Richard Jones rich at annexia.org
Thu May 8 10:19:58 UTC 2003


On Thu, May 08, 2003 at 11:07:08AM +0100, Martin A. Brooks wrote:
> On Thu, 2003-05-08 at 11:04, Tethys wrote:
> > This won't handle filenames containing spaces -- quite likely if they
> > were created by Mac or Windows users. You need to quote the "$i" (and
> > the setting of $newname a couple of lines earlier).
> 
> Use "mmv" - much easier.

That's quite an interesting command. OS-9{,000} used to have a command
called 'mkcom' which was also useful in these situations. If I can
remember the syntax it was something like:

mkcom -e "move *.old *.new" *.old

The -e option removed the extension from the list of files, and each
"*" in the first argument was then replaced by the filename. Of course
OS-9 also lacked a decent shell with for loops etc.

Sorry, I'm blathering :-)

Rich.

-- 
Richard Jones, Red Hat Inc. (London) and Merjis Ltd. http://www.merjis.com/
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
PTHRLIB is a library for writing small, efficient and fast servers in C.
HTTP, CGI, DBI, lightweight threads: http://www.annexia.org/freeware/pthrlib/


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list