Sign in to follow this  
Followers 0
Jonniemac315

Format a Drive

6 posts in this topic

I am looking to write a Auto it script to Format my F Drive nightly and make the label backup. I have tried writing a batch file to do this but it doesn't work. If I right click on the drive and go to format and then put in the volume lable it works like a champ. I can write it so that it clicks on everything but I am worried about it formating the wrong drive. Is there anyone that can help me write some error checking to make sure that I don't choose the wrong drive?

Thanks,

Jon

Share this post


Link to post
Share on other sites



I am looking to write a Auto it script to Format my F Drive nightly and make the label backup. I have tried writing a batch file to do this but it doesn't work. If I right click on the drive and go to format and then put in the volume lable it works like a champ. I can write it so that it clicks on everything but I am worried about it formating the wrong drive. Is there anyone that can help me write some error checking to make sure that I don't choose the wrong drive?

Thanks,

Jon

Skip the GUI and do it in AutoIt. Verify you are hitting the correct drive by volume label, drive serial number, tag file at root, etc. before formatting to be sure.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Skip the GUI and do it in AutoIt. Verify you are hitting the correct drive by volume label, drive serial number, tag file at root, etc. before formatting to be sure.

:)

I am new to the auto it any help would be great. If there was a way that you can give me some code to do this that would be great.

Thanks,

Jon

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

@All

Why not use the build in command in XP

To format a floppy disk in drive A and assign it the volume label "DATA," type:

format a: /v:DATA

More Info on the commands :

Formats

Regards,

ptrex

For some reason the 2003 Server will not run the command properly. I have tried this script already...

Thanks,

Jon

Share this post


Link to post
Share on other sites

For some reason the 2003 Server will not run the command properly. I have tried this script already...

Thanks,

Jon

I scripted some disk management in Windows Server 2000 and 2003 using DiskPart.exe. It was an AutoIt script that assembled a text file DiskPart script and passed it to DiskPart.exe with /S switch. That worked pretty well.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
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
Sign in to follow this  
Followers 0