home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / recurse.zip / recurse.cmd < prev    next >
OS/2 REXX Batch file  |  1995-11-28  |  760b  |  34 lines

  1. /* Creates a program object with an association to the type
  2.    "Snippet".  This will add the type Snippet to the association
  3.    list.  You can delete the program object once it is created,
  4.    but the type will remain in the list.
  5. */
  6.  
  7. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  8. call SysLoadFuncs
  9. say arg(1)
  10.  
  11. root = word(arg(1),1)
  12. if (length(root) = 0) then
  13. do
  14.   say "Must specify a folder to operate on"
  15.   exit
  16. end
  17.  
  18. action = subword(arg(1),2)
  19. if (length(action) = 0) then
  20. do
  21.   say "Must specify an action to apply"
  22.   exit
  23. end
  24. say "action="action
  25. say "root="root
  26.  
  27. rc = SysFileTree(root"\*", folders, "DSO")
  28.  
  29. rc = SysSetObjectData(root, action)
  30. do i = 1 to folders.0
  31.   rc = SysSetObjectData(folders.i, action)
  32. end
  33.  
  34.