Jump to content
Sign in to follow this  
Garret Picchioni

Format and Rename Volumes

Recommended Posts

Garret Picchioni

Is this a possibility in AutoIt? I've scanned the forums and help file but have come up empty. Using cmd won't work either. I'm writing a script that will format, rename, and update a set of flash drives (nightly) that we use at work. Since the drives are removable cmd asks you to press enter when the drive is inserted (regardless of if the drive is inserted already). Sending an Enter keystroke only works a user is logged into the machine at the time it runs (which I'd like to avoid).

I'm currently using a workaround for the format

FileDelete("E:\*.*")
but have come up empty for the renaming of the volume.

Does anyone know if AutoIt is capable of doing this, or should I start hunting for command line based utilities?

Thanks in advanced,

Garret

Edited by Garret Picchioni

Share this post


Link to post
Share on other sites
big_daddy

This should work, but I have no way of testing it right now. If somebody could test it for me that would be great.

_FormatVolume.au3

Edit: Found out that this requires Windows Server "Longhorn" or Windows Server 2003. :whistle:

Edited by big_daddy

Share this post


Link to post
Share on other sites
Garret Picchioni

I can test it when I get back to work on Tuesday.

Thank you for all of your help and I'll keep you posted

Share this post


Link to post
Share on other sites
Garret Picchioni

There is no chance of it working with XP Pro?

Share this post


Link to post
Share on other sites
Garret Picchioni

Look for Scriptomatic in scripts and scraps

once you have that and latest beta

try looking into Win32_LogicalDisk

Could you tell me what I might be looking for with Win32_LogicalDisk?

I've been playing around with it this morning but can't find anything that would help me with a format

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.