home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / clninipm.zip / CLEANINI2.CMD < prev    next >
OS/2 REXX Batch file  |  2002-05-13  |  1KB  |  32 lines

  1. /*This REXX program provides a command line user interface to the cleanini.exe program*/
  2. /*It accepts option parameters from the CLEANINI1.CMD program and*/
  3. /*then executes, or calls, cleanini.exe with those parameters*/
  4.  
  5.  
  6.  
  7. /*Begin finding the location of this REXX program, the CLEANINI1.CMD REXX program and the cleanini.exe executable file*/
  8. PARSE SOURCE OperatingSystem HowCalled FileSpec
  9. ProgramLocation = ""
  10. FileSpecPortion = FileSpec
  11. DO UNTIL FileSpecPortion = ""
  12.     PARSE Var FileSpecPortion FirstPart "\" SecondPart
  13.     SELECT
  14.         WHEN ProgramLocation = "" & SecondPart \= "" THEN ProgramLocation = FirstPart
  15.         WHEN ProgramLocation \= "" & SecondPart \= "" THEN ProgramLocation = ProgramLocation"\"FirstPart
  16.         OTHERWISE NOP
  17.     END    /*Ends "SELECT" Section*/
  18.     FileSpecPortion = SecondPart
  19. END    /*Ends "DO UNTIL FileSpecPortion = """ Section*/
  20. /*End finding the location of this REXX program, the CLEANINI1.CMD REXX program and the cleanini.exe executable file*/
  21.  
  22.  
  23.  
  24. /*Begin running the cleanini.exe program in another OS/2 windowed session*/
  25. ARG Options    /*Get the value of the argument passed to CLEANINI2.CMD and assign it to the variable, Options*/
  26. Commandline = "CD "ProgramLocation
  27. INTERPRET "CommandLine"        /*Change to the cleanini.exe subdirectory*/
  28. Commandline = "Cleanini.exe "Options    /*Start cleanini.exe with the selected options*/
  29. INTERPRET "CommandLine"
  30. /*End running the cleanini.exe program in another OS/2 windowed session*/
  31. EXIT
  32.