home *** CD-ROM | disk | FTP | other *** search
- The files listed at the end of this doc file are
-
- Copyright ⌐ 1991, by James E. Cooper Jr.
-
- No warranties are expressed or implied, use at your own risk. The source
- is included for educational purposes only. Please report bugs, etc. to the
- author at
-
- 103 Black Angus Run
- Cary, N.C. 27513
-
- bixname: jcooper
-
-
- -------------------------------------------------------------------------------
- SETSIZE
- -------------------------------------------------------------------------------
- Format: SETSIZE <file|pattern> [SIZE <number>] [ALL]
-
- Template: FILE/M/A,SIZE/K/N,ALL/S
-
- Purpose: Force a file to be a specific size, or chop ^Z's from end.
-
- Specification: SetSize is used to set a file to a specific size, using a
- new AmigaDOS 2.0 call, SetFileSize().
-
- If you do not specify a size for the file, SetSize will attempt to chop
- any ^Z characters from the end of the file. This is useful when
- downloading files from a BBS, as some download protocols do not keep
- the exact size of a file, and the file is padded with ^Z characters to
- force it to an even packet size.
-
- If you do specify a size (using the SIZE keyword followed by a number),
- SetSize will attempt to set the size of the file to that value. This
- can be useful when initially installing a 'fake' BridgeBoard Hard
- Drive, through jlink.sys. When the BridgeBoard HD image is created, it
- has to be initialized by the IBM format command, which only writes to
- the first few sectors of the disk. As you write files and data to this
- disk image, the size of the image file is extended on the Amiga drive.
- Therefore, it is unsafe to write to the image in such a way that it is
- extended, and then fail to close the file properly. This program will
- make sure that the file is extended on initial creation to avoid this
- problem.
-
- Using the ALL switch will cause SetSize to descend into all
- subdirectories of the current, chopping ^Z's or setting sizes
- accordingly.
-
- Be careful! While the ^Z chop feature is non-destructive (if there are
- no ^Z's on the end of the file, the size won't change), specifying a
- specific size WILL FORCE ALL FILES WORKED ON TO THE SPECIFIED SIZE!!!
-
- Note: The file must already exist or SetSize will fail.
-
- Example:
-
- SetSize <myfile>
-
- This will chop any trailing ^Z characters from the end of <myfile>.
-
- SetSize BB_HD size 3072000
-
- This will set up a 3 Meg file, possibly for use with the Bridgeboard.
- Note that the contents of this file are unspecified. You will still
- have to do any formatting, etc. to set the file up for use.
-
- SetSize DH0:#? size 1000 all
-
- This will set ALL FILES on DH0: to a size of 1000 characters! BE
- CAREFUL!!! Just as you must use programs such as Format wisely, watch
- what you do with this program.
-
- Files as distributed:
-
- lmkfile 295 ; makefile for SAS/C
- RCS Dir ; Directory for RCS files
- RCS_link 25 ; Fake softlink for use with RCS
- SetSize 724 ; Executable
- SetSize.c 11610 ; Source for SetSize
- SetSize.doc 3373 ; This doc file
- SetSize.o 1336 ; Object file
- SetSize_rev.h 184 ; C revision header (from bumprev)
- SetSize_rev.i 226 ; ASM revision header (from bumprev)
- SetSize_rev.rev 2 ; Revision file (from bumprev)
-
- RCS/SetSize.c,v 12016 ; RCS file for SetSize.c
-