How to format Multiple Removable Drives?

March 17, 2011 at 08:00:08
Specs: Windows XP
Hi all,
Good day!! I am here by searching some DOS command. Actually I want to format multiple USB drives at a time by DOS command. I already make a batch file also i can format but there is one problem, I have to press ENTER for every drive formating. Is there any command to skip the pressing enter manually? I really need it. Thanks in advance for helping. Take care...!

Regards,
Abir


See More: How to format Multiple Removable Drives?

Report •

#1
March 17, 2011 at 08:25:52
Do you really have that many drives and you have to format them so often?

Report •

#2
March 17, 2011 at 10:22:28
@Fred: Yes, i have to format like that and its often. If anybody has any idea please assist me.

Report •

#3
March 17, 2011 at 19:41:39
post your batch script here, we will try to make necessary changes.

Subhash Chandra.


Report •

Related Solutions

#4
March 18, 2011 at 03:04:18
Here is my Batch file:
:top
format e: /fs:fat32 /q
format f: /fs:fat32 /q
format g: /fs:fat32 /q
goto top

I need to format this 3 drives in a single command [Now i have to press ENTER for every Drives]. Thanks for assist me.


Report •

#5
March 18, 2011 at 18:44:24
try this carefully..

@echo off
echo Set WshShell = WScript.CreateObject("WScript.Shell") >%temp%\temp.vbs
echo WshShell.SendKeys "{enter}">>%temp%\temp.vbs
echo wscript.sleep 2000 >%temp%\wait.vbs
:top
start cmd /k format e: /fs:fat32 /q
cscript /nologo %temp%\wait.vbs
cscript /nologo %temp%\temp.vbs
start cmd /k format f: /fs:fat32 /q
cscript /nologo %temp%\wait.vbs
cscript /nologo %temp%\temp.vbs
start cmd /k format g: /fs:fat32 /q
cscript /nologo %temp%\wait.vbs
cscript /nologo %temp%\temp.vbs

Subhash Chandra.


Report •

#6
March 18, 2011 at 20:09:50
What about:

echo:|format a:


Report •

#7
March 18, 2011 at 23:12:50
It just occurred to me that format has (or at least used to have) a hidden "/y" switch to format without asking for input first...


format /y a:


Report •

#8
March 19, 2011 at 00:41:59
@Subhash: Thanks for your reply. this command is opening multiple window but actually i need like this:
For the first time it will ask for start [Enter] to start and at a time it will format 3 different Drives one after another after that it will go to top for the same process and after pressing Start [Enter] it will start again.....!!


Is there any command to do like this-
:top
format e: /fs:fat32 /q & format f: /fs:fat32 /q & format g: /fs:fat32 /q
goto top

it will format one after another and one time to press enter....I know this is not working but if anybody please assist me to run like this i will be really very grateful.


Report •

#9
March 19, 2011 at 03:00:17
:top
start format.exe e: /fs:fat32 /q
start format.exe f: /fs:fat32 /q
start format.exe g: /fs:fat32 /q
goto top

Happy is ONE who says I am an OttoMAN.


Report •

#10
March 19, 2011 at 03:21:19
Hi all,
I have another problem. For my PC when i plug USB it starts from drive "E" but if i try another PC it very uncertain to start from "E", so is there any command that can automatically recognize the removable devices and format only removable drives? otherwise this batch file is bounded with limited number of PC, i think its not complete. So, if anybody can assist me to find out some command to detect only removable disk to format it will be very favor for me....

Report •

#11
March 19, 2011 at 04:04:51
NOT guaranteed to be 100% accurate in all situations.
USE AT YOUR OWN RISK.

All this does is check if the mounted drive has the text
"RemovableMedia" as part of it's registry entry.

@echo off
for /f "tokens=2 delims=\	 " %%a in ('
  reg query hklm\system\mounteddevices /s ^|find "520065006D006F007600610062006C0065004D0065006400690061" ^|find ":"
') do (
    if exist %%a\ echo %%a is removable!
)
pause


Report •

#12
March 19, 2011 at 05:15:27
Very dangerous if a removable drive happens to be a large backup data volume.

Report •

#13
March 19, 2011 at 06:25:27
Thanks a lot Judago....!
its working fine and my problem is now solved. i just one to say all of the members are rock........again thanks a lot for helping me. I am too much happy now.

Report •

Ask Question