MLUG: Re: [MLUG] command to change case in filenames?
Re: [MLUG] command to change case in filenames?
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mike Miller wrote:
> We have a screwy VMS system that likes to change the names of files to
> uppercase.  When we then move the files to a unix machine, they have the
> 'wrong' filenames -- we want all lowercase letters.  So, I'd like a
> program that will convert uppercase filenames to lowercase filenames.  If
> such a program does not already exist, I will write a script to do it.
> 
> Does a unix program exist for changing uppercase filenames to lowercase?
> 
> Mike
> 

I know Jon King will totally disapprove of how I do it, but if all the 
files are in one directory, I do it like this:

cd directory
ls | perl -lne 'print "mv $_ ",lc($_)'
Look it over to check that it will do what you want, then
ls | perl -lne 'print "mv $_ ",lc($_)' | sh

-- 
Stephen Montgomery-Smith
EMAIL:PROTECTED
http://www.math.missouri.edu/~stephen

--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/