home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: tolower.rush 37.1 (2.12.93)
- **
- ** Rename selected file to lowercase.
- **
- ** Written by Douglas Keller
- */
-
- if( address() == "REXX" ) then address "RUSH.1"
-
- options results
-
- /*
- ** Get directory name on active side, RC = 1 for device list
- */
- 'getdirectory'
- dir = result
- if( RC == 0 ) then do
-
- if( right(dir, 1) ~= ":" ) then dir = dir || "/"
-
- 'getselected'
- file = result
- do while ( file ~= "" )
-
- lower = translate(file, "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
-
- if( file ~= lower ) then do
-
- 'statusmsg "Renaming ' || file || ' to ' || lower '"'
-
- address command 'rename quiet from ' || dir || file || ' to ' || dir || lower
-
- end
-
- 'getselected'
- file = result
- end
-
- /* re-read dir beause names have changed */
- 'setdirectory' dir
-
- end
-