Results 1 to 2 of 2
  1. #1
    vandyke is offline Member
    Join Date
    Dec 2009
    Rep Power

    Question 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.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    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

  1. Java Based Application to Map Network Drive
    By Wraithier in forum New To Java
    Replies: 15
    Last Post: 05-24-2012, 11:09 AM
  2. jvm on flash drive
    By kabinet in forum New To Java
    Replies: 4
    Last Post: 11-02-2009, 07:38 AM
  3. Signed Java Applet to read a file on hard drive?
    By ollyworks in forum Java Applets
    Replies: 2
    Last Post: 09-11-2009, 10:08 PM
  4. Reading Pen Drive
    By ravjot28 in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2008, 02:48 PM
  5. access cd drive
    By milinkp in forum New To Java
    Replies: 0
    Last Post: 07-20-2007, 06:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts