home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / progs / lcn.icn < prev    next >
Text File  |  2002-03-26  |  884b  |  36 lines

  1. ############################################################################
  2. #
  3. #    File:     lcn.icn
  4. #
  5. #    Subject:  Program tp convert file names to all lowercase
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     March 26, 2002
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  This program converts files named on the command line to all lowercase
  18. #  names.  Blanks are converted to underscores.
  19. #
  20. ############################################################################
  21. #
  22. #  Requires:  UNIX
  23. #
  24. ############################################################################
  25.  
  26. procedure main(args)
  27.    local name, lc, uc
  28.  
  29.    uc := &ucase || " "
  30.    lc := &lcase || "_"
  31.  
  32.    every name := !args do
  33.       rename(name, map(name, uc, lc))
  34.  
  35. end
  36.