FSUTIL.exe

Show the current setting for shortname behaviour:
FSUTIL 8dot3name query
Scan for affected registry entries:
FSUTIL 8dot3name scan [/s] [/l log_file] [/v] DirectoryPath
/s Recurse to subdirectories.
/l Log to file.
/v Verbose, output log to the console.
Change the setting for shortname behaviour:
FSUTIL 8dot3name set [0 through 3] [volume_Path] 1 | 0]
When a volume is not specified, this updates the registry
0 - Enable 8dot3 creation on all volumes
1 - Disable 8dot3 creation on all volumes
2 - Set 8dot3 creation on a per volume basis
3 - Disable 8dot3 creation on all volumes other than the system volume.
When a volume is specified, this updates individual volume's on disk flag.
This operation is only meaningful if the registry value is set to 2.
0 - Enable 8dot3 creation on this volume
1 - Disable 8dot3 creation on this volume
Remove the shortnames for all files within a directory:
FSUTIL 8dot3name strip [/t] [/s] [/f] [/l log_file] [/v] DirectoryPath
This command will permanently remove 8dot3 filenames from a volume.
It will list the registry keys pointing to the stripped filenames but will not
modify the affected registry keys. Stripping will not be performed on any
files with full path names longer than the maximum path length of 260 chars.
**WARNING** If there are affected registry keys and you use the override switch /f
it is recommended that you backup your volume as it may lead to unexpected
application failures including the inability to uninstall.
/t - Test mode, perform all operations except the actual stripping of filenames.
/s - Recurse all subdirectories
/f - Force, Strip the directory 8.3 filenames even if there are registry conflicts.
/v - Verbose mode, output log to the console.
/l - Specify an output log file, if not specified this will default
to "%temp%\8dot3_removal_log@(GMT YYYY-MM-DD HH-MM-SS)"
EXAMPLE: fsutil 8dot3name strip /l SS64.log /s D:\datafiles

FSUTIL fsinfo drivetypevolume pathname
Eg : fsutil fsinfo drivetype C:
Script to list all drives on the local computer:
@Echo off
:: Store all the drive letters currently in use in a variable
For /f "tokens=*" %%L in ('FSUTIL fsinfo drives') do (set _drives=%%L)
:: Remove the first 8 characters - the 'Drives:' prefix
:: this may need to adjusted for other languages/locales
Set _drives=%_drives:~8%
:: Find and Display the drive type of each drive
For %%D in (%_drives%) do (FSUTIL fsinfo drivetype %%D)

To run FSUTIL, you must be logged on as an administrator or a member of the Administrators group.

Sparse files provide a method of saving disk space for files that contain meaningful data as well as large sections of data composed of zeros. If an NTFS file is marked as sparse, then disk clusters are allocated only for the data explicitly specified by the application.
e.g. The Indexing Service, stores it's catalogs as sparse files.

With 8.3 filennames disabled you'll notice a performance improvement only with a large number of files (over 300,000) in relatively few folders where a lot of the filenames start with similar names. Not having 8.3 filenames available will prevent the use of old applications such as Word 2.0 and Excel 4.0

If you have a lot of small files, you might need a larger Master File Table to avoid MFT fragmentation:FSUTIL behavior set mftzone 2 will reserve 25 % of the volume for the MFT.
1 = 12.5 %(default)
2 = 25%
3 = 37.5%
4 = 50%

This won't affect existing disk partitions, after changing the mftzone size, reboot the machine and create a new partition.

Increasing the MFT zone does not decrease the disk space available for data files.

The last access time attribute of NTFS can slow performance, if you disable it, the time set will simply be the Creation Time.FSUTIL behavior set disablelastaccess 1

Bugs

FSUTIL outputs a NULL character (not a space) after every drive specifier, this can cause difficulty when piping the output of fsutil into other commands (particularly FOR). The output from FSUTIL varies by OS see this forum thread for more detail.

Some features in fsutil are reported to not work correctly under FAT or FAT32 volumes e.g. FSUTIL dirty query.

“You can tune a file system, but you can't tune a fish” ~ Sun man page for tunefs