Changing Uppercase filenames into Lowercase

From: Fred Bach (music_at_triumf.ca)
Date: 08/10/05


Date: Tue, 09 Aug 2005 18:19:51 -0700

Dear c.o.v. list,

  I already found MAKEUP.COM which breaks down a filename
  into its parts (device,directory,name,type,version) and
  uses the RENAME command to rename lowercase names and
  types to uppercase.

  I tried a simple modification which supplied the second
  argument to the RENAME command inside MAKEUP.COM with a
  lowercase filename. This DOES NOT WORK.

  The filename remains uppercase because DCL uppercases
  everything on MAKEUP.COM's RENAME line. And, the RENAME
  line in MAKEUP.COM does not seem to work with quotation
  marks around the lowercase portion.

  I haven't yet found any combination of quotation marks
  that works with the RENAME or CREATE commands. Ideas such
  as RENAME "FRED.TMP" "fred.tmp" do not work, nor does
  CREATE "fred.tmp". Specifying an FDL file with lowercase
  filename works, and it does create a lowercase filename,
  but that is a very cumbersome approach as I would have to
  ANALYSE/RMS/FDL every file and then edit the FDL file to
  put the filename spec into lowercase, and then use CREATE/FDL
  to create a new but empty lowercase file and then I would
  have to append the original uppercase file into that, and
  then delete the original uppercase file. That seems far,
  far too complicated and bulky.

  However, I did stumble across this method:

      RENAME &old_filename &new_filename

  works just fine where the symbol old_filename represents
  the uppercase equivalent and the symbol new_filename
  contains the lowercase equivalent. The ampersand operator
  prevents DCL from translating the symbol until after the
  command line is parsed, thus preventing the conversion of
  the new_filename symbol's contents to uppercase.

  Using this technique, I modified MAKEUP.COM into
  MAKELOWER.COM, removed one bug, and it works very well to
  rename a whole directory full of schedules to lowercase
  filenames which I can then directly FTP over to a
  case-sensitive linux-based webserver with the MPUT FTP
  command. This allows me to match a meta-standard that we
  seem to have here about lowercase filenames on some servers.

  I can send MAKELOWER.COM to whomever wants a copy for
  evaluation. I am not sure that it is bug-free yet.

  But am I missing something easy? Is there any other
  way to easily rename filenames to lowercase? Has
  something just zipped right over my head? Searches on
  google.com and Openvms.org didn't produce useful results.
  Can the CONVERT command be used to do what I want?

  Thanks for your help.

  .. fred bach music@triumf.ca



Relevant Pages

  • Re: Index.html - lower case i not saving correctly
    ... lowercase spelling, and keeping them. ... Rename index.html to index.htm ... When I click on the button's hyperlink properties, ... Index.html (with an uppercase I), which in turn does not find my correctly ...
    (microsoft.public.frontpage.programming)
  • Re: Changing Uppercase filenames into Lowercase
    ... > I already found MAKEUP.COM which breaks down a filename ... > uses the RENAME command to rename lowercase names and ... > lowercase filename. ... > The filename remains uppercase because DCL uppercases ...
    (comp.os.vms)
  • Re: Renaming a server
    ... not changing the name by going from uppercase to lower case or visa versa. ... You need to rename it to something different. ... I need to rename my server to a lowercase name - I do - but when it ...
    (microsoft.public.windows.server.general)
  • Re: Changing Uppercase filenames into Lowercase
    ... > uses the RENAME command to rename lowercase names and ... > The filename remains uppercase because DCL uppercases ... > marks around the lowercase portion. ... To get DCL to use lowercase filenames you must enter ...
    (comp.os.vms)
  • Bash text editing problem
    ... convert the first letter of each word in a filename to uppercase. ... it won't change the other characters to lowercase. ... with the first character and the rest of the word separately. ...
    (comp.os.linux)