home *** CD-ROM | disk | FTP | other *** search
/ New Horizons Shareware Collection / HORIZONS1.BIN / INICLEAR.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-27  |  2KB  |  40 lines

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /* IniClear.Cmd                                                            */
  4. /*                                                                         */
  5. /* This command file takes a text file containing the names of your file   */
  6. /* areas and removes the entries in your OS2.INI user file that correspond */
  7. /* to them.                                                                */
  8. /*                                                                         */
  9. /* WARNING: MAKE SURE YOU HAVE A BACKUP OF YOUR OS2.INI *BEFORE* YOU RUN   */
  10. /* THIS REXX SCRIPT.                                                       */
  11. /*                                                                         */
  12. /* The file that this REXX file expects as input should have ONE file area */
  13. /* name listed per line, in the same manner as the ALLFILES.CFG that is    */
  14. /* used for the All Files List generator code.                             */
  15. /*                                                                         */
  16. /***************************************************************************/
  17. '@ECHO OFF'
  18.  
  19. /* Change this to point to the list of your file areas */
  20. FileAreas = 'areas.lst'
  21.  
  22. /* Load the RexxUtil INI file function */
  23. Call RxFuncAdd 'SysIni', 'RexxUtil', 'SysIni'
  24.  
  25. /* If the file area file exists, hammer the INI entries */
  26. If Stream(FileAreas, 'c', 'query exists')<>'' Then Do
  27.     Call CharOut , 'Working...'
  28.  
  29.     Call SysIni 'USER', 'MaxFilePM', 'DELETE:'
  30.  
  31.     Do Until Lines(FileAreas)=0
  32.         AppName = LineIn(FileAreas)
  33.         Call SysIni 'USER', AppName, 'DELETE:'
  34.     End
  35.  
  36.     Call Stream FileAreas, 'c', 'close'
  37.     Say
  38.     Say 'Done!'
  39. End
  40.