Chsize

PURPOSE   OPERATION   OPTIONS   COMMAND LINES   RELATED PROGRAMS  


Author: Dan Mares, dmares @ maresware . com (you will be asked for e-mail address confirmation)
Portions Copyright © 1998-2020 by Dan Mares and Mares and Company, LLC
Phone: 678-427-3275

 

All programs are command line programs.
MUST be run within a command window as administrator.


top

Purpose

Chsize will alter/change the size of a file on the disk.

It can either expand (add to) the size of the file with hex 00's, or truncate (decrease) the size of the file.

If the file is truncated, truncated data is lost.


top

Operation

When expanding the size of the file, Chsize adds nulls (hex 00) to the file to establish the final requested size of the file.

When truncating the file, data at the end of the file is lost.


top

Options

None


top

Command Line

C:>chsize    file_name    final_size

C:>chsize    file_name    +add_bytes

C:>chsize    file_name    -subtract_bytes

C:>chsize      anyfile       10000

/* will change the size of anyfile to 10000 bytes */

C:>chsize    anyfile    +200
    /* will add 200 bytes to the file */

top

Related Programs

Sample

Mktemp

top