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

  • Thread starter Thread starter Mr Prince
  • Start date Start date
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
 
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...
 
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
 
Back
Top