5 Ways to Create Fake Dummy File on USB Flash Drive to Enable Write Protect and Prevent Modification
3. USBDummyProtect
For shear ease of use, USBDummyProtect is about as friendly as it gets. It will create a single dummy file that will automatically fill up your USB flash drive to the last byte, preventing anything else writing to the drive. Simply copy the USBDummyProtect executable file to the USB flash drive and whenever you want to fill up the empty space, run USBDummyProtect and a “dummy.file” will be automatically created until the drive shows 0 bytes free.
If you need the space back, you can either manually delete the dummy.file yourself or double click on the USBDummyProtect.exe again which will delete the dummy file.
There is no GUI for USBDummyProtect, it’s free and open source while being only 12KB in size. The program does have a limitation though which is the 4GB file size limit on FAT/FAT32 file systems so you can’t use it effectively on a FAT formatted flash drive with over 4GB free space.
4. Dummy File Maker
The Dummy File Maker tool is small, very simple to use and is a tiny portable executable of under 20KB. There are not many options available but it does have the useful ability of calculating for you how big the the dummy file will need to be in order to completely fill the remaining space. It does save you the extra step of having to note this down from the Properties dialog and entering it yourself.
Simply place the program onto your USB flash drive, run it and the required file size will automatically populate the box, if you want to create a custom size dummy file, untick the “Using all free space in current drive” box and type in the desired size in bytes. This option is useful if you’re trying to fill up a large FAT/FAT32 drive to create files under 4GB. Enter your chosen file name or leave it at the random entry and click the button. The sub folder tick box will create a folder with the same name as the file.
5. Using the Fsutil Built in Windows Utility
An easy way to fill up your flash drive without third party software is to use fsutil, a command line tool included in Windows.
1. Firstly, you have to know how much free space is left on the USB drive. Plug in the drive, go to (My) Computer, right click on the drive letter and select Properties. Take note of the “Free space” that is in bytes. The USB drive below has 518,979,584 bytes free space, so a dummy file needs to be created that has the exact file size.
Open up command prompt from Start Menu -> Accessories or entering cmd into the search box and type the following command:
fsutil file createnew F:\MyDummyFile {size from step 1}
You will notice your USB flash drive’s LED blinking meaning the file is being created. After the complete confirmation, the drive now has 0 free space and viruses won’t be able to get in. Obviously you change the byte size and drive letter to match your USB flash drive, the name can be whatever you wish. When you want to copy files onto USB, simply delete the dummy file. When you’re done, create the dummy file again using the fsutil command.
You wouldn’t want to use these tools all the time because too much reading and writing will make your USB flash drive wear out faster, or in another words, shorten its lifespan. It is a useful method though to stop anything writing to the flash drive, whether it’s from another user or a virus trying to replicate itself.
Sounds like a great idea, especially with being able to simply use the FSUTIL command, along with other articles with disabling write access in Windows, but I think the only real security can be found by having a USB drive that has a hardware write protection function that can’t be changed or bypassed by software, similar to the write protect tab that were on floppy disks. I have no idea of whether such thumb drives even exist or where I could find them, but that is one thing I miss about the design of older floppy disks and floppy disk drives.
Thanks for great tips! – Very useful.
However the Dummy File Maker and USB Dummy Protect zip files are password protected and thus cannot be used.
The password is on the download page. All our self hosted password protected files have the same password.
HI Raymond. I’m looking for a way to prevent writing in a folder, because this folder belongs to a software that updates automatically. I would like to allow it to update itself, without rewriting some files inside the folder or recreating the files I’ve deleted.
This software usually deletes the folder it wants to update, save the preferences, and recreates the install with the saved preferences. It think it’s the way it works. Or maybe it deletes everything but the preferences folder, with a white list.
I went to this page because of the “dummy file” idea. I could mess a little with permissions, but I wonder if there’s a software that manages permissions easily, it’s a headache to do that with several folders with partial permissions: reading, executing, but not writing or modifying.
Searching a way to lock the folders, but I’m afraid it may causes errors and stop the update process in other folders. Is there solutions to make a process believe it changes something, and go on, when it changed nothing?
Some people have this problem with unwanted Windows updates, the solution for my problem may also applies here.
I don’t think it’s possible to do what you are asking, certainly not using a dummy file method. The program will most likely crash or throw up an error if it can’t delete or overwrite the files like it wants to.
Your best option might be to setup some sort of file synchronization for that folder.
Hi All,
thanks Raymond for the wonderful tutorial ,
‘usb drive protector++’ from softpedia is my pick and i would use both the functions to double secure !
Is there no way to make a FAT32 formatted drive ready only from any computer?
I don’t want the files to be deleted on any computer. Unless they format or something.
I don’t care I just want the files to not be delete able
STARTNET
Hi, I hope that someone will be able to help me. I want to load files on to a USB Flash drive (although the file sizes in total is only about 3GB the flash drive is 8GB in size) and then prevent anyone from either deleting the files or formatting the drive. IS there any possibility of doing something like that, without having to spend a fortune on extra software? To better explain the problem, this is what it is all about. I had custom looking USB Flash drives made for my company. These will then be used to give information and quotations etc to customers. But this is the problem, I do not want them to edit or delete info, or for that matter format the USB Flash drive. Any way of doing this?
I do not think it’s possible to prevent someone from formatting a USB flash drive via software alone.
That is a pity, but thank you for the reply.
Well hellllo! Will this work for media where someone could only play pics from usb drive and not transfer from drive to another computer or drive?
Sleepless in Detroit
The files which are already on the USB drive are still readable and can be copied, they just can’t be modified and written back to the disk.
Hello Raymond, I think this is a great way to protect our USB Flash Drives, but I have a question. Is there any virus that could erase this fake dummy file or any other file and then infect the USB Flash Drive?
It’s not impossible for a virus or trojan to delete the fake file, but it is incredibly difficult for that to happen and I don’t know of anything off hand that can do it. For a virus to actually get onto the flash drive to do damage, it has to attach itself to a file first, which it can’t do because there is no space available.
Although this method is by no means as effective as a hardware write switch, it works for just about all viruses because they just can’t get onto the drive to do anything. Some programs also protect the files to make deleting them much harder as well.
Thanks for the answer.
Thank you Raymond for this informative tutorial. Keep posting more, God bless…
This is the best solution I’ve found out to protect my USB Flash Drive from the useless worms and viruses.
Thanks for the awesome post.
This is one of the best article that I ever seen!
Special thanks for your wonderful service.
I have been learning a lot from you.
Keep up the good work.
Thanks for the wonderful tips, this is what I am always looking for. thank you.
great tips, never think it before .. :)
this is very nice! i always thank you raymond!
thanks this new information of us and great article
Very useful tool. Thanks for the share, Raymond
Good Info ,thanks Raymond
thanks ray.
You are great again :-)
great way , thanks for the tip!
Utilizing Windows’ native fsutil tool for the purpose is a brilliant idea. I wonder why almost all of us haven’t thought about it. Thanks a lot, Raymond!
Nice. I like learning new dos commands and great tools too!!!
Thanks Ray!
Great tip mate, thanks!
nice idea! thanks Raymond
Great tool!!
Thanks
Excellent tips Ray! Extremely useful
Hi Raymond
Nice tool. Thanks anyway …..
Very helpful Raymond.
This is what I’ve been looking for.
Very Useful Tool
Thanks Raymond