(view source code of upcase.cmd as plain text)
/* Rename file(s) to all lower case *//* Written by Rob van der Woude *//* http://www.robvanderwoude.com *//* Parse command line parameters */parse upper arg filespec dummy"/"option
if dummy <> "" then call Syntax
if filespec = "" then call Syntax
if option <> "" then do
option = left( option, 1 )
if option <> "S" then call Syntax
end/* Initialize RexxUtil */if RxFuncQuery( SysLoadFuncs ) = 1 then do
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
call SysLoadFuncsendcall SysFileTree filespec, "file.", "FO"||option
if file.0 = 0 then call Syntax "FileNotFound"
do i = 1 to file.0
newname = translate( filespec( "N", file.i ) )
say "1B"X||"[1;1H"||"1B"X||"[K"||newname||"0D0A"X||"1B"X||"[K"||"1B"X||"[1A"
address CMD "@CMD /C REN "||file.i||" "||newname
endEXITSyntax: procedure expose filespec
sayif arg( 1 ) = "FileNotFound" then do
say "File not found: "||filespec
endelse do
say "UpCase - convert file names to all uppercase"
say "Written by Rob van der Woude"
say "http://www.robvanderwoude.com"
end saysay "Usage: UPCASE <filespec> [ /Subdirectories ]"
exitreturnpage last modified: 2025-10-11; loaded in 0.0048 seconds