Jump to content

format


Recommended Posts

Yes AutoIT can be used to format an removeable Drive, but you have to use a DOS Command.

;example
#include <process.au3>
$sDrive = FileSelectFolder("Choose a Drive.", "",  2); Select a Drive
_RunDOS("format " & $sDrive & "/X");Formats the Drive with NTFS and cancels every allocation
                ;of the Volume
MsgBox(0, "Finished", $sDrive & "is formatted")

This Script is usable, although you may want to add Control and Error routines.

Just check the Helpfile.

For further Information on "format" type in the cmd.exe Window

format /?
Edited by freanir

freanir

Link to comment
Share on other sites

can autoIT format a removable drive?

bit sloppy, as the script has no idea what the dos format command has done.

it says complete if you select a dvd drive straight away,obviously nothing has been formatted.

better somehow to launch the windows format control.

not sure how to go about that tho

call a dll?

Link to comment
Share on other sites

bit sloppy, as the script has no idea what the dos format command has done.

The script works for me.

I won't do everything for you, except you're willing to pay me. :o

BTW: I answered your question it is posible to format per AutoIt, the script is just a bonus. So you've got to excuse the "sloppiness".

it says complete if you select a dvd drive straight away,obviously nothing has been formatted.

Can't test it, because I've got no (re)writeable Medium, except a HDD.

better somehow to launch the windows format control.

Imho the control is just a frontend for the Dos-Command. :geek: Edited by freanir

freanir

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...