Rob van der Woude's Scripting Pages

Rexx Examples

 

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

Download the ZIPped sources Click the floppy disk icons to download the ZIPped sources

Checksums for the ZIPped sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPped sources

 

REXX Examples
Click the floppy disk icons to download the ZIPped sources Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPped sources Name OS Description Last Modified Also available in Remarks
All OS/2 Win DOS
batch
NT
batch
JScript KiXtart Perl Power
Shell
VB
Script
  Three different ways to display text:

     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source 2Console   O   Write directly to console, preventing redirection 1999-11-01                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source 2StdErr A     Write to standard error instead of standard output 1999-11-01              
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RexxOut   O   A Rexx program to show and test the differences between standard output, standard error and console 1999-11-01              
 
     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source 4AllMembers   O   Executes a command once for each member of a global group, optionally substituting the "#" character by the user ID. 2000-03-14   NT           NT batch files available for Windows NT 4 and 2000
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Alphabet A     Create an alphabetical navigation bar for the specified HTML file (like the one above this table).
You will have to add the <A NAME="char"> tags manually before using this script.
2005-03-30                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Bin2Rexx A     Converts small binary files into Rexx scripts that will, in turn, recreate the original binary file when executed.
Originally created to store icon files in Rexx installation scripts.
2002-12-31                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOS.orx     W Display BIOS manufacturer & date 2006-09-11   NT   K P PS V This Object Rexx script, and the batch and PowerShell versions too, were created using my WMI Code Generator.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOSDate A     Display BIOS date 2003-03-09 D NT     P     Original idea by ComputerHope.
Perl, batch and Rexx versions all use DEBUG.EXE to read info from BIOS.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOSInfo V1 A     Display BIOS manufacturer & date 2003-03-12       K P     Perl and Rexx versions both use DEBUG.EXE to read info from BIOS.
Rexx version 1 uses "plain" string parsing, version 2 uses Patrick TJ McPhee's RexxRE Regular Expression Library.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BIOSInfo V2 A 2003-11-02
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BkAllDrv     W Backup all Windows 2000 drivers 2003-12-30   NT   K P     These scripts require Microsoft's DEVCON utility; you will be prompted to download it if it isn't found
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BkMdmDrv     W Backup Windows 2000 modem drivers 2003-12-27              
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BkVidDrv     W Backup Windows 2000 video drivers 2003-12-28              
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source BootDriv A     Return boot drive letter 2003-01-01 D NT         V Techniques for OS/2 explained by Dick Goran in his January 1997 Rexx Column in OS/2 Magazine
  Set of three OS/2 MultiMedia Rexx scripts:

     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDadd   O   Restore the audio CD player's list of CD titles and tracks 2000-06-04               This set of 3 Rexx scripts uses OS/2 MultiMedia (MMOS2) Rexx Support to perform its tasks.
This will make it extremely hard to port them to Windows.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDlist   O   Save MMOS2's audio CD player's list of CD titles and tracks in ASCII format 2000-06-04              
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDPclean   O   Remove annoying CD player settings 2000-06-04              
 
     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDEject   O   Example of OS/2 Multimedia Rexx Support.
Execute it if you want a "free coffee mug holder".
2000-06-04       K   PS V OS/2 Rexx script uses OS/2 MultiMedia (MMOS2) Rexx Support.
Windows versions use Windows Media Player.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDPlayer   O   Ejects CD-ROM if in CD drive at startup of CD Audio player 2000-06-04   NT           This Rexx script needs both OS/2 MultiMedia (MMOS2) Rexx Support and Quercus Systems' RexxLib to perform its task
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CDROM A     Retrieve CD-ROM drive letter(s) 2002-12-23 D NT   K     V  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CheckPRN     W Checks the default printer set in the registry and displays a message if it isn't an HP LaserJet III or if it isn't on your own client PC (sorry, hard coded, you'll have to adapt the "valid." variable yourself) 2000-06-04               Add this script to the logon scripts for Citrix users and save yourself lots of calls for support
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ChkSize A     Check a file's size against a specified value 2003-01-07                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Choice A     Rexx version of DOS' CHOICE command 2002-12-31       K       Uses Quercus Systems' RexxLib (available for OS/2 only) for the timeout function, but will not fail if RexxLib isn't available: in that case the timeout option will just be ignored
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CLCalc A     Command Line Calculator: returns an errorlevel based on the result of a specified command line expression 2002-12-30                
  Convert to and from Unix style text files:

     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CrLf A     Replace orphaned CR and LF with CR/LF pairs 2003-02-27         P     CR = Carriage Return, LF = Line Feed
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source CrLf2Lf A     Replace CR/LF pairs with LF's only 2002-12-30         P    
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DblCr2Cr A     Replace double CR/LF pairs with a single CR/LF pair 2002-12-30         P    
 
     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Cut   O W "Port" of Unix' CUT to Rexx 2002-01-04         P     Separate OS/2 and Windows versions due to differences in handling of standard input.
Explained (a little) on my Unix ports page
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Dec2Hex A     Convert a decimal number to 8 digit hexadecimal 2002-11-17   NT   K P   V All
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DefPRN   O W1
W2
Shows the default printer and port for the local computer 2003-02-02   NT J K P   V OS/2 version will even work for RPL workstations.
Windows version 1.* (W1) uses LesTec Pty Ltd.'s RexxIO library.
Windows version 2.* (W2) uses Patrick McPhee's W32Funcs library.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DiskUse A     Shows the amount of disk space used by subdirectories 2003-01-07   NT           Uses Quercus Systems' RexxLib if available, but will not fail if it is not.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source DriveRdy   O   Checks if the specified drive is valid and ready 2000-06-04 D             Needs Quercus Systems' RexxLib
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Drivers A     Batch file to display all active drivers 2003-12-15               Uses either RMVIEW and CUT (OS/2 Warp) or Microsoft's DEVCON (Windows NT4/2000/XP)
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Easter A     Calculate Easter Day's date for a specified year 2002-03-26   NT J K P   V Based on the instructions found at Simon Kershaw's KEEPING THE FEAST.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source False A     Port of Unix' "false" command 2003-04-02       K P     See also the matching True command.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source FaR A     Find and Replace substrings in a string 2003-04-13       K P     KiXtart version comes with matching FaR.bat.
  Inspired by the Norton Utilities:

     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source FileAttr A     Display and/or set a file's attributes 2002-12-31               The Windows version of this script cannot set file attributes (only list them), the OS/2 version can. The difference is due to a difference in the RexxUtil implementations.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source FileDate   O W Changes a file's date/time attributes 2003-01-01               OS/2 version needs Quercus Systems' RexxLib.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source FileSize   O   Display the total file size, used disk space and slack, or disk space needed to copy 2000-06-05               Needs Quercus Systems' RexxLib.
 
     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source FileSys A O   Check the file system of the specified drive 2002-01-01   NT           Both versions need Quercus Systems' RexxLib to function in OS/2.
  NT's FOR command ported to OS/2:

     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ForD   O   A first attempt to make the power of NT's FOR command, and its /D option in particular, available for OS/2 batch files 2003-01-05                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ForF   O   A first attempt to make the power of NT's FOR command, and its /F option in particular, available for OS/2 batch files 2003-01-05              
 
     
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source GetRes   O   Display screen resolution settings 2000-06-04   NT   K P PS V  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source GetPorts A     Display addresses of all serial and parallel ports 2003-01-18 D NT     P     Rexx, Batch and Perl versions all use DEBUG.EXE
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source HtmlTags A     Convert HTML tags to uppercase without changing scripts or quoted strings (except hexadecimal color numbers), to make the HTML file more readable and to conform to the original specifications for HTML tags 2003-01-01               By now obsolete, since the XHTML specification requires lower case tags.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source IBMError A     Display message for specified POST error number 2002-10-23                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source InfHdr   O   Extract the title(s) of specified OS/2 INF (help) file(s) 1999-07-18                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source KillProg   O   Kill an OS/2 process by its program file name 2000-12-12   NT         V Needs Quercus Systems' RexxLib
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source LastBoot   O   Display the last boot time of any computer on the network 1999-02-28   XP         V XP version requires WMIC
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source LeapYear A     Check if the specified year is a leap year 2002-11-26 D NT J K P PS V MS-DOS version uses BATCHMAN by Michael Mefford
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ListObj   O   Displays a list of all objects on your OS/2 Desktop and in its sub-folders 2000-06-05               Uses Quercus Systems' RexxLib if available, but will not fail if it is not
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source LoCase   O   Convert filenames to all lowercase 2000-07-11   NT   K       Use UpCase to convert to all uppercase
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Obscure A     Obscure an URL by converting the host name to a decimal IP address and by adding a hostname (either fake or valid) as a fake login name 2003-05-25   NT     P     Browser security settings may block the use of decimal IP addresses
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source PowerOff     W Shutdown and poweroff local computer 2002-10-28               Uses W32Funcs
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source PrintPDF     W Print a list of specified PDF files 2003-05-01   NT   K P   V Uses W32Funcs
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Random A     Display a random number between 1 and 100 2000-06-14 D NT J K P   V  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ReadINI A     Read a value from an INI file 2003-03-31   NT   K P   V Batch version may fail on "special" characters like & | < > and parenthesis
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ReadReg A     Read a value from the registry 2003-04-05   NT   K P   V Batch version may fail on "special" characters like & | < > and parenthesis
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source ReadLine A     Read a single line from standard input (Rexx version of OS/2 Warp COMMAND.COM's internal READLINE command) 2000-06-05                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Resistor   O   Using ANSI color codes to practice E12 resistor color codes 2000-06-05       K       Rexx script uses ANSI.SYS for cursor positioning; functionality included by default in OS/2; for Windows NT see George Roettger's home page for help on running ANSI.SYS in NT.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source RxSysLvl   O   Returns OS/2 version and fix-pack level (original idea by Mike Ruskai, posted 06/24/99 in comp.lang.rexx newsgroup) 2000-06-05                
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source SCSI     W List all SCSI and IDE devices 2003-10-25   NT   K       Tested in Windows 2000 only.
View the output sample.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source SortDate A     Display current date in YYYYMMDD format 2002-03-25 D NT J K P PS V MS-DOS version uses BATCHMAN by Michael Mefford
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source SortTime A     Display current time in HHmmss format 2002-03-25 D NT J K P   V MS-DOS version uses BATCHMAN by Michael Mefford
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source StarDate A     Convert current date & time to stardate 2003-01-26   NT   K P   V Based on an algorithm found on The StarTrek Gallery
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source TaskList   O   Display a list of active programs 2000-06-06   NT       PS V Needs Quercus Systems' RexxLib
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Tee A     Port of Unix' TEE command: redirect standard input to standard output and to a file simultaneously. 2003-02-15   NT     P     Explained (a little) on my Unix ports page
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Tomorrow A     Display tomorrow's date in 2 formats. 2002-12-29     J K P PS V  
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source True A     Port of Unix' "true" command 2003-04-02       K P     See also the matching False command
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source TxtComp A     Compare two text files (ignoring locations of lines) and write the differences into two newly created log files.
Multilingual (NL and US, other languages can be added easily).
2003-03-02           PS   Originally created to compare OS/2 CONFIG.SYS files before and after a software installation, this program will prove extremely useful when comparing other ASCII files as well.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Unique A     Remove duplicate lines from a text file 2003-12-06               Written to check and modify small text files only; although it does work with large files, it will be really slow!
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source UpCase   O   Convert filenames to all uppercase 2000-07-11   NT   K       Use LoCase to convert to all lowercase
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source VideoROM A     Display manufacturer info from the display adapter video ROM 2002-12-25 D NT   K P   V Original idea by ComputerHope.
Rexx, Batch and Perl versions use DEBUG.EXE.
VBScript and KiXtart versions created using Microsoft's Scriptomatic tool.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source WallPaper   O W Randomly change bitmaps for background (Windows and OS/2) and lockup screen (OS/2 only) 2004-06-16   NT         V Read the comments in the script before using it
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Week A     Display week number. 2001-08-21 D NT J K P PS V DOS batch version needs Solid Oak Software's WEEKOFYR.COM.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Which   O W Enhanced "port" of Unix' WHICH to Rexx 2000-06-04 D NT   K P PS   Explained (a little) on my Unix ports page
Click the floppy disk icon to download the ZIPped source   WMIGen.hta       This HTA generates Batch, C#, Delphi, F#, Java, JScript, KiXtart, Lua, Object Pascal, Object Rexx, Perl, PowerShell, Python, Ruby, VB .NET and VBScript code for WMI queries 2016-01-28             HTA Automatically checks for updates.
Based on the example from the Microsoft TechNet ScriptCenter article Scripting Eye for the GUI Guy, with help from the Scripting Guys' Scriptomatic 2.0 and HTA Helpomatic tools and The Script Center Script Repository: Sample Windows PowerShell Scripts.
C# code generation with assistance of Bas van der Woude.
Click the floppy disk icon to download the ZIPped source Click the question mark icon to view the MD5 and SHA1 checksums for the ZIPped source Yesterday A     Display yesterday's date in YYYYMMDD format. 2002-03-26   NT J K P PS V  

 

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 


page last uploaded: 2016-09-19, 14:57