Monday, April 26, 2010

DOS: Createfile of user-defined size

Hi Guys,

Here's something on our own, tried, tested and approved DOS commands.

Recently I came across a dos command that can create files of sizes that user needs. I thought this was useful and can used for:
- Creation of files as a test data
- Automation purposes based on the requirements
- For loading/stressing hard disk
- Boundary Value testing (since files can be craeted with least count of 1 Byte)
(Contributions by Sunil Ubranimath)

DOS Command:
fsutil file createnew c:\test.txt 2000

This creates a file test.txt on C:\ of 2000 Bytes. The data in the file is nothing but 'whitespaces'.


Other useful DOS commands:
C:\Documents and Settings\Chetan>fsutil
---- Commands Supported ----

behavior - Control file system behavior
dirty - Manage volume dirty bit
file - File specific commands
fsinfo - File system information
hardlink - Hardlink management
objectid - Object ID management
quota - Quota management
reparsepoint - Reparse point management
sparse - Sparse file control
usn - USN management
volume - Volume management

No comments: