DOS commands

stevovo

Expert Member
Joined
Apr 24, 2008
Messages
1,496
Reaction score
2
Location
Pretoria
Does anybody know if there is a way in dos to check the filesystem of a drive? ie. whether it is CDFS or FAT32 for eg.
 
just run chkdsk without any command switches.

It should tell the filesystem at the top.

C:\>chkdsk
The type of the file system is NTFS.

WARNING! F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
0 percent completed.

You can also run fdisk - but care should be taken lest you delete your partitions. ;)
 
Let me be a bit more specific :p

I want to use it in a batch script to scan a drive but only if it is not a CD or DVD.
 
erm

whoops. Read the question wrong.... USE 'diskpart' and enter 'list volume'
 
Last edited:
It works but it only states if a drive is NTFS and not FAT32 or CDFS, it also takes a few seconds while it checks for something I think.

It's under dos but in windows xp, I forgot to mension that :)

what happens when you run that command on a FS / Drive that is not NTFS?

When you run it on a CD drive it will report....

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>chkntfs f:
The type of the file system is RAW.
F: is not dirty.
 
Last edited:
what happens when you run that command on a FS / Drive that is not NTFS?

This is what it says on both a cd drive and a fat32 memory stick:

"Cannot query state of drive X:"

So I still wont know whether to scan it or not because I wont know if it is a CDFS or FAT32, I will only know that it is not NTFS.
 
This is what it says on both a cd drive and a fat32 memory stick:

"Cannot query state of drive X:"

So I still wont know whether to scan it or not because I wont know if it is a CDFS or FAT32, I will only know that it is not NTFS.

When I run that command on a CD drive it reports it as RAW
and when I run it on a FAT drive it reports it as FAT

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>chkntfs g:
The type of the file system is FAT.
G: is not dirty.
 
When I run it on my Flash Drive I get this report...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>chkntfs k:
The type of the file system is FAT32.
K: is not dirty.

So on my system it reports...

RAW = CD File System
FAT = FAT
FAT32 = FAT32
NTFS = NTFS

How come it gives an error message on yours?

The only varialbe is the drive letter.
 
Using
Code:
fsutil fsinfo volumeinfo c:\
will produce
Code:
Volume Name :
Volume Serial Number : 0x704f082d
Max Component Length : 255
[b]File System Name : NTFS[/b]
Supports Case-sensitive filenames
Preserves Case of filenames
Supports Unicode in filenames
Preserves & Enforces ACL's
Supports file-based Compression
Supports Disk Quotas
Supports Sparse files
Supports Reparse Points
Supports Object Identifiers
Supports Encrypted File System
Supports Named Streams
Maybe you can filter the highlighted part out in order to check for NTFS?
 
Top
Sign up to the MyBroadband newsletter
X