1.

Solve : Check Filesystem with .bat-File?

Answer»

Hello!

At first I want to note that I'm not a native english speaker, so please forgive me MISTAKES in the grammer.

Now to the Problem:

I have to check if the FileSystem is Fat32 and when it is Fat32 then he should do something. Like in stupid language

If Filesystem = Fat32 (
START program1
)else(
start program2
)

Is that possible WITHOUT creating some files? And how could I do that?

THANKS for your help!

FJThere are more efficient ways to do this, but this should work:

Code: [Select]@echo off
for /f "tokens=1-8" %%a in ('chkdsk DRIVE: ^| find /i "file system"') do (
set filesys=%%h
)
if filesys==NTFS ....
if filesys==FAT32 ....
if filesys==FAT ....

Note: Change drive: to the drive you are checking.

Hope this helps. 8-)

Thank you!

Does I need something? Only chkdsk.exe or?



Discussion

No Comment Found