Tuesday, January 23, 2007

Creating large Sized files

If you want to create a file of any size just use nothing more than what's supplied with Windows.
Start by converting the desired file size into hexadecimal notation (base 16). Use the Windows Calculator (to open calculator, type calc in the run command and press enter) in Scientific mode (click on view in the calculator and select the "scientific mode") do to this. Suppose you want a file of 1 million bytes. Enter 1000000 in the calculator and click on the Hex option to convert it (1 million in hex is F4240.) Pad the result with zeroes at the left until the file size reaches eight digits— 000F4240.

Now open a command prompt window. Enter the command DEBUG BIGFILE.DAT
You get a message saying "File not found", ignore that message.
Type RCX and press Enter key.
Debug will display a colon prompt.
Enter the last four digits of the hexadecimal number you calculated (4240, in our example).
Type RBX and press Enter key, then enter the first four digits of the hexadecimal
size (000F, in our example).
Enter W for Write and Q for Quit.
C:\>debug bigfile.dat
File not found
-rcx
CX 0000
:4240
-rbx
BX 0000
:000f
-w
Writing F4240 bytes
-q

You've just created a one-million-byte file using Debug; and you can create it of your desired size using the same technique.

1 comment:

Timothy said...

where is the hugh file created saved to?