How to write directly to disk volume

June 9, 2009 at 11:20:11
Specs: Windows XP
Hello All,
I am in need of a way to write the contents of a file directly to a disk volume. The disk volume is an un-formatted file system.

The key is that I need to do this without any external application. Using the command prompt I can redirect the contents of any output to a file like this:

type C:\text1.txt > C:\text2.txt

I need to do something along the lines of

type C:\text1.txt > \\?\Volume{f7332785-83f3-11dd-b055-000ffe86f25f}\

When I attempt the above command I receive the error:
"The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted."

I know that the file system is not recognized and I don't care. I want to write the data directly to the device which is file system independent at this level.

Has anybody done this or have any idea how to accomplish this without use of any imaging software? I could download the windows command line version of 'dd' and accomplish this but I need to be able to do this without any external software.

Thanks for any recommendations.

See More: How to write directly to disk volume

Report •

June 9, 2009 at 15:52:17
How do you expect to do anything without "external software"? If the functionality you want isn't part of Windows, then by definition you'll be using external software.

How about telling us WHY you can't use external software? There are plenty of ways to accomplish this, but you already ruled out most of them with your mystery requirement. What's special about your requirements that precludes using tools?

Report •

June 9, 2009 at 21:03:24
I agree with the above comments. Additionally I would say that it isn't a good idea to write a lot of files directly to the root directory of a partition.

Report •

June 10, 2009 at 04:51:01
Wow lowhanginghoney, high and mighty aren't you? Not sure if you noticed but this is a “forum” where people seek answers to questions, not a place for some overconfident half wit to write arrogant replies. I’m going to make the assumption that you have a very hard time dealing with people in the real world and this is your only outlet to vent or feel intelligent. In that case I feel a little sorry for you. You probably don’t have the balls to stand up for your self in person so you resort to hiding behind a screen name. Go outside and get some human interaction and you may find that most people treat others with respect when they are seeking help, maybe it will open your eyes a bit. Also, go get some therapy and next time you reply to someone’s question remember that they are looking for help. I’d love to meet you in person, next time you’re in Baltimore drop me a line.

Maybe I should note: If you’re going to be a jerk then don’t bother replying to my post or anybody’s post for that matter. But I thought that went without saying. Its people like you that make these forums rot and bleed and give the rest of the intelligent and friendly IT people a bad rap. Too bad for that you’re out there poisoning this good resource. You’re what’s wrong with the industry I work in.

Simply put, I’m looking for some help creating a solution. If you can’t offer anything constructive then move on.

Moving on back to the post...

"How do you expect to do anything without "external software"?"

Well, that was my question and the whole reason for the post. “Is there a way to do this without any external software?” Like maybe using some of the utilities built into the operating system. Who cares WHY I can't install external software, but I'll tell you any way: The machines I work with are in a secure business environment where little outside software is ever used. A lot can be accomplished with a bare machine if you use all of the resources provided. The fact that I can not install external software is the whole basis of this post. I know this is easily accomplished with using outside software but I do not have that option for this scenario. Maybe it is impossible but I am exploring all avenues.

There are plenty of command prompt utilities built into the Windows OS. I was curious if anybody had been able to accomplish this before which is why I asked the question.

OtheHill – “Additionally I would say that it isn't a good idea to write a lot of files directly to the root directory of a partition”

In most cases that is correct but with the ability to write directly to a partition you could essentially write an image to a disk. I am aware of the possibility of destroying the data on the disk or other potential dangers.

I’ll ask again, is there anybody that has any suggestions that can answer without acting like lowhanginghoney?

If an admin comes across this post please don’t delete it. If you want to edit/revise it please feel free but I think that people should know that you have to treat others with respect and there are too many people out there that just want to make some sort of point and make others feel like crap for asking a question.

Report •

Related Solutions

June 10, 2009 at 08:52:10
Hah. Touched a nerve, did I?

Report •

June 10, 2009 at 10:04:37
>> The disk volume is an un-formatted file system. <<

That is not possible. Without formatting, there is no file system, no folders, no root folders. nothing but a blank disk. It is the formatting that creates the file system.

Without a file system all you can do it write to specified locations on the hard disk and Windows will not allow you do that. To write directly to the disk you would have to do it outside of Windows and that means specialised software.

If you do attempt to write to the hard disk outside of a file system you will certainly wind up corrupting something unless you have an external record of where every byte on the hard disk is stored. That is the job of the file system. Without a file system the hard disk has no way of deciding where to put that data that you are trying to write.

Your comments to lowhanginghoney where completely uncalled for as your request demonstrates a total lack of understanding of how a hard disk works. In view of that the comments were quite reasonable.


Report •

June 10, 2009 at 10:52:19
Thanks StuartS, for attempting a polite reply. This concept is not far fetched nor does it display misunderstanding of how hard drives work, but hear me out, I can understand why you might think the question sounds strange. What I am talking about is basically disk imaging: accessing the disk at a block device level and writing the contents of a file (aka image file) directly to it. This sort of thing is done all of the time via outside utilities like the windows port of 'dd' (a popular command line linux imaging program) or other imaging software. If the answer is simply "there is nothing in windows that can accomplish this" then OK but I am attempting to exhaust every possibility. This is actually a rather sophisticated question, dealing with the hardware on a block device / pre-formatted level and writing data to it. The contents of the file being written to the device do contain the entire file system.

Please, take a look at some of lowhanginghoney’s other posts and his interactions with people, I did after I received his response. My entire argument in the text above is about simple decency when somebody is asking a question. There is a trend of people acting like this in forums and it is ridiculous. If you do look at some of his posts you will see that some people simply don't understand computers and that is why they look to places like this for help. And he is right there to shoot them down for asking in the first place. It is not right to treat them like an idiot when they are seeking answers.

Report •

June 10, 2009 at 11:03:59
If you're so offended by my post, why not ignore it? Seems like you're spending quite a bit of mental energy fretting about how you're "treated". Toughen up, big guy. And stop acting like a prima donna, nobody owes you anything.

Report •

June 10, 2009 at 11:14:04've participated in exactly one thread on this forum, but you're complaining about this forum "bleeding and rotting"? How perfectly self-entitled and arrogant. Perhaps the forum rots and bleeds more becuase of people like you who demand help, while placing restrictions and expectations on what help they are willing to accept. Site's free, dude, and nobody owes you anything.

Report •

June 10, 2009 at 11:39:20
You not going to do it. Imaging software is a special case. Before imaging software writes to the hard disk it has to reference the Master Boot Record to find out were if any unallocated space it. It then has to work out how many sectors or cluster the image requires. It then tells the hard disk controller directly which cluster to start writing the data and were to end and how many cluster there are. Finally it updates the Master boot Record. All this has to be done by software written for the task.

You cant use the Master Boot record for a files but you can for an image because it is in effect a formatted partition, not a file. You cant include the file system within a file because the file system has to exist before the file is written.


Report •

June 10, 2009 at 11:41:05
Gottcha, Thanks for the info StuartS

Report •

Ask Question