home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / packery / realsize / realsize.lha / RealSize / example.script next >
AmigaDOS Script File  |  1997-08-20  |  665b  |  30 lines

  1. .key FILE/A
  2. .bra {
  3. .ket }
  4.  
  5. ; Usage: execute example.script <filename>
  6. ; Will report if file is crunched or not, and size
  7.  
  8. failat 21
  9. RealSize {FILE} >ENV:parp
  10. set RSRC $RC
  11. IF $RSRC eq 20
  12.   echo Can't size file {FILE} : $RealSizeError
  13. ELSE
  14.   IF $RSRC eq 5
  15.     echo {FILE} is not crunched, but is $parp bytes nevertheless
  16.   ELSE
  17.     echo {FILE} is $parp bytes uncrunched
  18.   ENDIF
  19. ENDIF
  20. unset RealSizeError
  21. unset RSRC
  22.  
  23. echo and the directory it's in looks like this uncrunched:
  24. list {FILE} to env:parpdir lformat %f
  25. echo >t:exeme failat 21
  26. list $parpdir files lformat "echo *"%-28n*" *`realsize %n*`" >>t:exeme
  27. execute t:exeme
  28. delete ENV:parp ENV:parpdir T:exeme QUIET
  29.  
  30.