home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / setsize.lha / setsize / SetSize.doc < prev    next >
Encoding:
Text File  |  1991-08-17  |  3.3 KB  |  87 lines

  1. The files listed at the end of this doc file are
  2.  
  3.         Copyright ⌐ 1991, by James E. Cooper Jr.
  4.  
  5. No warranties are expressed or implied, use at your own risk.  The source
  6. is included for educational purposes only.  Please report bugs, etc. to the
  7. author at
  8.  
  9.         103 Black Angus Run
  10.         Cary, N.C.  27513
  11.  
  12.         bixname: jcooper
  13.  
  14.  
  15. -------------------------------------------------------------------------------
  16.                 SETSIZE
  17. -------------------------------------------------------------------------------
  18. Format:     SETSIZE <file|pattern> [SIZE <number>] [ALL]
  19.  
  20. Template:    FILE/M/A,SIZE/K/N,ALL/S
  21.  
  22. Purpose:    Force a file to be a specific size, or chop ^Z's from end.
  23.  
  24. Specification:    SetSize is used to set a file to a specific size, using a
  25.     new AmigaDOS 2.0 call, SetFileSize().
  26.  
  27.     If you do not specify a size for the file, SetSize will attempt to chop
  28.     any ^Z characters from the end of the file.  This is useful when
  29.     downloading files from a BBS, as some download protocols do not keep
  30.     the exact size of a file, and the file is padded with ^Z characters to
  31.     force it to an even packet size.
  32.  
  33.     If you do specify a size (using the SIZE keyword followed by a number),
  34.     SetSize will attempt to set the size of the file to that value.  This
  35.     can be useful when initially installing a 'fake' BridgeBoard Hard
  36.     Drive, through jlink.sys.  When the BridgeBoard HD image is created, it
  37.     has to be initialized by the IBM format command, which only writes to
  38.     the first few sectors of the disk.    As you write files and data to this
  39.     disk image, the size of the image file is extended on the Amiga drive.
  40.     Therefore, it is unsafe to write to the image in such a way that it is
  41.     extended, and then fail to close the file properly.  This program will
  42.     make sure that the file is extended on initial creation to avoid this
  43.     problem.
  44.  
  45.     Using the ALL switch will cause SetSize to descend into all
  46.     subdirectories of the current, chopping ^Z's or setting sizes
  47.     accordingly.
  48.  
  49.     Be careful!  While the ^Z chop feature is non-destructive (if there are
  50.     no ^Z's on the end of the file, the size won't change), specifying a
  51.     specific size WILL FORCE ALL FILES WORKED ON TO THE SPECIFIED SIZE!!!
  52.  
  53.     Note:  The file must already exist or SetSize will fail.
  54.  
  55. Example:
  56.  
  57.     SetSize <myfile>
  58.  
  59.     This will chop any trailing ^Z characters from the end of <myfile>.
  60.  
  61.     SetSize BB_HD size 3072000
  62.  
  63.     This will set up a 3 Meg file, possibly for use with the Bridgeboard.
  64.     Note that the contents of this file are unspecified.  You will still
  65.     have to do any formatting, etc. to set the file up for use.
  66.  
  67.     SetSize DH0:#? size 1000 all
  68.  
  69.     This will set ALL FILES on DH0: to a size of 1000 characters!  BE
  70.     CAREFUL!!!    Just as you must use programs such as Format wisely, watch
  71.     what you do with this program.
  72.  
  73. Files as distributed:
  74.  
  75. lmkfile              295    ; makefile for SAS/C
  76. RCS                 Dir    ; Directory for RCS files
  77. RCS_link              25    ; Fake softlink for use with RCS
  78. SetSize              724    ; Executable
  79. SetSize.c           11610    ; Source for SetSize
  80. SetSize.doc            3373    ; This doc file
  81. SetSize.o            1336    ; Object file
  82. SetSize_rev.h             184    ; C revision header (from bumprev)
  83. SetSize_rev.i             226    ; ASM revision header (from bumprev)
  84. SetSize_rev.rev            2    ; Revision file (from bumprev)
  85.  
  86. RCS/SetSize.c,v        12016    ; RCS file for SetSize.c
  87.