Folding Filenames to Lower Case

One additional consideration when transferring files to UNIX is that the filenames must all be folded to lower case. If your PC-based FTP package does not support an option for this (a problem with the built-in W95 FTP.EXE), then we advise getting one that does (such as ZTERM or WS_FTP Pro.) If that is not practical, or you forget and end up with thousands of files with mixed upper and lower case names, there is a utility script called trlcs in the /vm/miame/bin directory which will properly fold one or more filenames (based on a wildcard spec) in a single directory to lower case. It does, however, require that you execute the command in each of your directories. For example:

$ cd /vm/miame/dsk0/020001

$ trlcs '*'

$ cd ../020002

$ trlcs '*'

<etc>

 

(Note that if a wildcard specification is given, it must be quoted.) If for some reason you do not have the trlcs command, you can create it by typing in the following and then using chmod +x trlcs to make it executable:

# trlcs: converts wildcarded files to lower case names

if [ $# != 1 ]

then

  echo "trlcs converts names of files in wildspec list to lcs"

  echo "usage: trlcs \047wildspec\047  (wildspec must be quoted)"

else

  for f in $1; do

        mv $f `echo $f | tr A-Z a-z

  done

fi