home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / GETCD.CMD < prev    next >
Encoding:
Text File  |  1993-11-14  |  737 b   |  36 lines

  1. /*  rexx program to make an object on the desktop */
  2.  
  3.  
  4. /* add system functions */
  5. result=RxFuncQuery(SysDriveMap)
  6. if result=1 then
  7. do
  8.   call RxFuncAdd 'SysDriveMap','RexxUtil','SysDriveMap'
  9. end
  10.  
  11. result=RxFuncQuery(SysFileSearch)
  12. if result=1 then
  13. do
  14.   call RxFuncAdd 'SysFileSearch','RexxUtil','SysFileSearch'
  15. end
  16. /* get list of drives */
  17. map=SysDriveMap('C:','USED')
  18.  
  19. say "list is " map
  20. /* check to see which one contains CD */
  21. count=Words(map)
  22. i = 1
  23. Do while i <= count
  24.    drive = Word(map,i)
  25.    say "drive is " drive
  26.    result = SysFileSearch('Experience C++', drive'\Intro1.TXT', 'foo.')
  27.    if result=0 then
  28.    do
  29.       say "on drive " drive
  30.       return drive
  31.    end
  32.    i = i+1
  33. end
  34. return "error"
  35.  
  36.