Results 1 to 2 of 2
- 12-08-2009, 11:09 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 1
- Rep Power
- 0
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.
Many thanks.
- 12-09-2009, 01: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.
Similar Threads
-
Java Based Application to Map Network Drive
By Wraithier in forum New To JavaReplies: 15Last Post: 05-24-2012, 11:09 AM -
jvm on flash drive
By kabinet in forum New To JavaReplies: 4Last Post: 11-02-2009, 07:38 AM -
Signed Java Applet to read a file on hard drive?
By ollyworks in forum Java AppletsReplies: 2Last Post: 09-11-2009, 10:08 PM -
Reading Pen Drive
By ravjot28 in forum Advanced JavaReplies: 1Last Post: 07-05-2008, 02:48 PM -
access cd drive
By milinkp in forum New To JavaReplies: 0Last Post: 07-20-2007, 06:14 AM
Bookmarks