top of page

Creating a blank file in Windows, so we can drop it in case of disk space emergencies

Disk space. It’s like Christmas presents, you just can’t have enough. But sometimes you run out, and most of the time it is in the most inconvenient of times. For instance right now I am sitting with a 250GB Database log file, normally big Log files are no problem as long as the backups are running and truncating the log files in question. But seeing as the backups have failed we now have a situation where there is 0 space available.

This is a slight problem, and while I am backing up the Log file in question to truncate and resize it a thought came to mind. I wish I could just delete something to free up some space while the backup is running.

Along comes my new plan of action. Create a blank file for emergencies as this.

1.Open “Command Prompt”

2. Run this command

fsutil file createnew <filename> <size>

fsutil file createnew C:\MyEmergencyFile.dat <size>

<size> is in bytes so to do the conversion we have to multiply a bit. Say we are looking for a 10GB file we do the following:

10 * 1024 * 1024 * 1024 = 10 * 1073741824 = 10737418240

fsutil file createnew C:\MyEmergencyFile.dat 10737418240

There we go, now I have some quick space in case this ever happens again.

Adrian

2 views0 comments

Recent Posts

See All
bottom of page