Home > Commands A-M > Commands F

FSUTIL FILE


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Finds a file by security identifier, queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, sets zero data for a file, or creates a new file.


Syntax

FSUTIL FILE help

FSUTIL FILE createnew drive length

FSUTIL FILE findbysid user drive

FSUTIL FILE queryallocranges offset=offset length=length drive

FSUTIL FILE setshortname drive short_name

FSUTIL FILE setvaliddata drive data_length

FSUTIL FILE setzerodata offset=offset length=length drive


Parameters
length (NTXP)
Specifies the file's valid data length.
createnew (NTXP)
Creates a file of the specified name and size, whose content consists of zeroes.
data_length (NTXP)
Specifies the length of the file in bytes.
drive (NTXP)
Specifies the drive letter (followed by a colon), mount point, or volume name.
(NT2003)
Specifies the full path to the file including the file name and extension.
findbysid (NTXP)
Finds files on NTFS volumes that belong to a specified user. The user is identified by their SID (security identifier).
help (NTXP)
Display help.
length=length (NTXP)
Specifies the length of the range, in bytes.
offset=offset (NTXP)
Specifies the start of the range to set to zeroes.
queryallocranges (NTXP)
Queries the allocated ranges for a file on an NTFS volume. Useful for determining whether a file has sparse regions.
setshortname (NTXP)
Sets the short name (8.3 character-length file name) for a file on an NTFS volume.
setvaliddata (NTXP)
Set the valid data length for a file on an NTFS volume.
In NTFS, there are two important concepts of file length: the End of File (EOF) marker and the Valid Data Length (VDL). The EOF indicates the actual length of the file. The VDL identifies the length of valid data on disk. Any reads between VDL and EOF automatically return 0 in order to preserve the C2 object reuse requirement.
Only available for administrators because it requires the Manage Volume privilege. This feature is only required for advanced multimedia and system area network (SAN) scenarios.
setzerodata (NTXP)
Sets a range (specified by offset and length) of the file to zeroes, which empties the file. If the file is a sparse file, the underlying allocation units are decommitted.
short_name (NTXP)
Specifies the file's shortname.
user (NTXP)
Specifies the user's user name or logon name.

Switches

none.


Related

FSUTIL BEHAVIOR
FSUTIL DIRTY
FSUTIL FSINFO
FSUTIL HARDLINK
FSUTIL OBJECTID
FSUTIL QUOTA
FSUTIL REPARSEPOINT
FSUTIL SPARSE
FSUTIL USN
FSUTIL VOLUME


Notes

If a volume's dirty bit is set, this indicates that the file system may be in an inconsistent state. The dirty bit can be set because the volume is online and has outstanding changes, because changes were made to the volume and the computer shutdown before the changes were committed to disk, or because corruption was detected on the volume. If the dirty bit is set when the computer restarts, chkdsk runs to verify the consistency of the volume.

Every time Windows XP starts, Autochk is called by the Kernel to scan all volumes to check if the volume dirty bit is set. If the dirty bit is set, autochk performs an immediate chkdsk /f on that volume. Chkdsk /f verifies file system integrity and attempts to fix any problems with the volume.


Examples

none.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NTXP NT2003

Last Updated: 2003/07/28
Direct corrections or suggestions to: Rick Lively