Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting

Status
Not open for further replies.

MasterQ

Programmer
Jul 13, 2005
1
US
OK, i'm just starting out in QB and i'm trying to have a user input a drive letter of a USB pen drive and then format it using FAT or FAT32. This is how i am going about it:

Code:
Dim driveletter as string
input driveletter
shell "format " + driveletter + ": /FS:FAT32"

when i use that nothing happens at all. what am i doing wrong? or is there a better way to do this
 
I tried your code with windows 98 and format.com doesnt have the /FS parameter. it worked correctly otherwise. with windows XP i don't know if the SHELL command is working differently but you may try to use SHELL with a single string like this:
Code:
[b]
CLS
INPUT "Which drive do you want to format "; DriveLetter$
FormatString$ = "FORMAT.COM " + UCASE$(DriveLetter$) + ": /FS:FAT32"
shell FormatString$
[/b]

SkyFighter
skyfighta@hotmail.com
Get the fun out of life!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top