Results 1 to 2 of 2
- 12-09-2009, 12:09 AM #1Member
- Join Date
- Dec 2009
- Rep Power
Best way to format a drive/thumb drive in java...
Title says it all...
I'm looking for the best way to format a drive with java on a windows box (Linux is easy). My problem at the moment is the format command requires user input. I would prefer not to kludge it by having the application act like a person.
The goal is to completely automate the formating of a drive.
- 12-09-2009, 02:32 AM #2
i would theorize there is a windows API facility to invoke the format a disk operation. It most likely would require administrative privileges? but in theory it must be possible to create a small native component with a Java binding that would allow you to invoke it.
But I would believe that would be even more kudgy (or at least heavy weight) than creating a thread to 'screen scrape' a child process invocation to the format command line tool, where scanning the displayed text and writing out commands to drive it would actually be easier, at least probably less work to package it.
I once did this kind of interactive invoke a command line, scan the output, and drive it with keystrokes to create a Java API for running the linux fdisk command.
- By Wraithier in forum New To JavaReplies: 15Last Post: 05-24-2012, 12:09 PM
- By kabinet in forum New To JavaReplies: 4Last Post: 11-02-2009, 08:38 AM
- By ollyworks in forum Java AppletsReplies: 2Last Post: 09-11-2009, 11:08 PM
- By ravjot28 in forum Advanced JavaReplies: 1Last Post: 07-05-2008, 03:48 PM
- By milinkp in forum New To JavaReplies: 0Last Post: 07-20-2007, 07:14 AM