home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / DSA2.ZIP / RUNDSA.CMD < prev   
OS/2 REXX Batch file  |  1991-05-31  |  533b  |  20 lines

  1. /**/
  2. /* This REXX program runs the DSA program to see how many
  3.    bytes are occupied by files on the current drive. */
  4.  
  5. parse arg spec
  6.  
  7. if spec = '' then spec = '\';
  8.  
  9. scale = 'megabyte'    /* We'll ask for megabytes first */
  10.  
  11. address cmd 'dsa /s /m /r' spec    /* Run DSA (Suppress screen output) */
  12.  
  13. if RC = 0 then do    /* Less than 1Mb so ask for KILOBYTES */
  14.     address cmd 'dsa -k -r -s' spec
  15.     scale = 'kilobyte'
  16.     end
  17.  
  18. if RC <> 1 then scale = scale || 's';    /* Get the English right! */
  19. say RC scale 'occupied by files.'
  20.