home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / os2 / cenv2_19.arj / DIRSTAT.CMD < prev    next >
OS/2 REXX Batch file  |  1994-03-08  |  751b  |  24 lines

  1. @echo OFF
  2. REM **************************************************************************
  3. REM *** DirStat.cmd - Use Find#.cmm to parse directory listings and output ***
  4. REM *** ver.1         statistics about the current directory.              ***
  5. REM **************************************************************************
  6.  
  7. SETLOCAL
  8. set DELDIR=
  9. set FIND_TEMP_FILE=DSTemp.cmd
  10.  
  11. dir | find "file(s)" | cenvi Find#.cmm
  12. call %FIND_TEMP_FILE%
  13. set FILE_COUNT=%NUMBER%
  14.  
  15. if exist %FIND_TEMP_FILE% del %FIND_TEMP_FILE%
  16. dir | find "file(s)" | cenvi Find#.cmm -1
  17. call %FIND_TEMP_FILE%
  18.  
  19. ECHO The current directory contains %FILE_COUNT% files and uses %NUMBER% bytes.
  20.  
  21. REM Clean-up
  22. if exist %FIND_TEMP_FILE% del %FIND_TEMP_FILE%
  23. ENDLOCAL
  24.