Batch file to determine if your HD is NTFS if not Format:FTFS

M

Mr Prince

G'day, I am trying to write a batch file that will run on
a bootdisk. This batch file will be able to tell if your
Hard drive is formated NTFS and if it isn't it will
format it NTFS. Something like "if not NTFS format c:\
FS:NTFS"
Thanks for all your help
Adam
 
M

Mark V

In said:
G'day, I am trying to write a batch file that will run on
a bootdisk. This batch file will be able to tell if your
Hard drive is formated NTFS and if it isn't it will
format it NTFS. Something like "if not NTFS format c:\
FS:NTFS"

What (presumably DOS) commandline tool do you have that can format
the volume NTFS in the first place? No DOS flavor format.* can do
this to my best knowledge.

And what about partition issues, and ... ?

Maybe (and I do not know) something like Partion Magic (DOS) could be
scripted to do it.

The other half is, what (presumably DOS) tool can reliably detect
NTFS and also be scripted? (I know of none, though they may exist)

*NIX boot and scripting might be a better approach perhaps. But I
cannot advise on that.

The actual BATCH mechanism for determining what to do is relatively
easy (as in testing an errorlevel perhaps), but everything else...
 
M

Matt Hickman

Mr Prince said:
G'day, I am trying to write a batch file that will run on
a bootdisk. This batch file will be able to tell if your
Hard drive is formated NTFS and if it isn't it will
format it NTFS. Something like "if not NTFS format c:\
FS:NTFS"


chkntfs c: | find "NTFS" > nul || format c: /fs:NTFS

--
Matt Hickman.
There is magic in words, black magic--if you
know how to invoke it.
Robert A. Heinlein (1907 - 1988)
"If This Goes On--" ASF c.1940
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top