1.

Solve : removing label of a volume...?

Answer»

Hi,

I have a script lile as follows:

format_vols.bat
-------------------
echo y | format E: /FS:NTFS /X /Q
echo y | format F: /FS:NTFS /X /Q
echo y | format G: /FS:NTFS /X /Q


-----------------------------------------
The drives E:, F: and G: all have volume label...Hence the above script does NOT work...
If I MANUALLY remove the labels for them, then the above script WORKS fine...\


Along with the formatting of vols, I am looking for a solution that can be used to "remove" vol. label of the drives. Subsequent to which my "format" commands will run flawlessly.

I know, manually, REMOVING vol label works, like
c:> label E:
And I can press ENTER to remove the current vol...but how can I put it in a script (bat file?

Will really appreciate any help on the subject.

THANKS,
DK.There are a LOT of ways to do everything on a computer. This may work for you.
Code: [Select]
echo. > autoresp.txt
label e: < autoresp.txt
label f: < autoresp.txt
label g: < autoresp.txt
echo y | format E: /FS:NTFS /X /Q
echo y | format F: /FS:NTFS /X /Q
echo y | format G: /FS:NTFS /X /Q
del autoresp.txt
echo Done! Done!! Done!!!


Hope this helps. Hi,

Thanks a lot f or the reply...But this still does not seem to work...
It changes my vol label to " " (a blank space)...Hence the subsequent format command fails....

Any other ideas??

Will appreciate U'r response.

Thanks.OK..


I found a soln...If I use the /FORCE switch, it works without any issues...
For e.g.,
echo y | format E: /FS:NTFS /X /Q /FORCE

works like a charm.

Thanks.



Discussion

No Comment Found