home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / objdir.zip / OBJDIR / INSTALL.CMD next >
OS/2 REXX Batch file  |  1996-07-25  |  4KB  |  65 lines

  1. /* REXX *********************************************************************/
  2. /*                                                                          */
  3. /* Name:        OBJectDIRectory                                             */
  4. /*                                                                          */
  5. /* Version:     1.00                                                        */
  6. /*                                                                          */
  7. /* Author:      Jon Renton (c)                                              */
  8. /*                                                                          */
  9. /* Date:        7.96                                                        */
  10. /*                                                                          */
  11. /* Description: Accept Dragged & Dropped Desktop Objects and start a        */ 
  12. /*              command prompt in the directory for the given object.       */
  13. /*              This is a useful tool for anyone who needs (or wants)       */
  14. /*              to work using a command prompt, but hates to enter the      */
  15. /*              the drive and full path name of the required directory.     */
  16. /*                                                                          */
  17. /* Files:       INSTALL.CMD  - Description & Installation                   */
  18. /*              OBJDIR.CMD   - Main Exec                                    */
  19. /*              OBJDIR.ICO   - Icon                                         */
  20. /*                                                                          */
  21. /* Install:     Create a desktop object which starts the program '*'.       */
  22. /*              On the Object Settings Notebook Page, change parameter      */
  23. /*              value to '/K <path>\OBJDIR.CMD %*'. Change <path> as        */
  24. /*              required or create an object by running this exec. This     */
  25. /*              Exec must be run from the directory where the files are     */
  26. /*              located.                                                    */
  27. /*                                                                          */
  28. /* System:      OS/2 REXX support must be installed.                        */
  29. /*                                                                          */
  30. /* Copyright:   This utility may be distributed & used free of charge       */
  31. /*              (FREEWARE), as long as all files remain unchanged and are   */
  32. /*              included in this package.                                   */
  33. /*                                                                          */
  34. /*              Any suggestions or comments are welcome. Please send an     */
  35. /*              EMAIL to me at Compuserve 100655,265 or                     */
  36. /*              100655.265@compuserve.com.                                  */
  37. /*                                                                          */
  38. /*              Or just let me know if you are using ObjDir. I am always    */
  39. /*              working on new tools to make life a little easier and a     */
  40. /*              mail always motivates !!!!                                  */
  41. /*                                                                          */
  42. /****************************************************************************/
  43.  
  44. Trace Off
  45.  
  46. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  47. call SysLoadFuncs
  48.  
  49. DIR = TRANSLATE(DIRECTORY())
  50. OBJ = "OBJDIR"
  51.  
  52. CLASS="WPProgram"
  53. TITLE="Object Dir"
  54. LOC="<WP_DESKTOP>"
  55. CONF="EXENAME=CMD.EXE;PARAMETERS=/K "DIR"\"OBJ".CMD %*;ICONFILE="DIR"\"OBJ".ICO"
  56. OPT="U"
  57.  
  58. CRC = SysCreateObject(CLASS, TITLE, LOC, CONF, OPT)
  59.  
  60. If (CRC = 1) then
  61.   Say 'Creation ended successfully' 
  62. Else
  63.   Say 'Creation failed with RC: 'CRC 
  64.  
  65. Exit