- What Is Windows File System? [Help]
- Quick Navigation :
- About Windows File System
- Types of Windows File System
- FAT32 in Windows
- NTFS in Windows
- exFAT in Windows
- Comparisons among the Three Types of Windows File System
- Compatibility
- Security
- Supported Volume Size
- Supported File Size
- File System Conversion
- How to Change the File System without Formatting in Windows
- Changing the File System without Formatting in Windows
- Changing the File System using a Software
- File path formats on Windows systems
- Traditional DOS paths
- UNC paths
- DOS device paths
- Example: Ways to refer to the same file
- Path normalization
- Identify the path
- Handle legacy devices
- Apply the current directory
- Canonicalize separators
- Evaluate relative components
- Trim characters
- Skip normalization
- Case and the Windows file system
What Is Windows File System? [Help]
Quick Navigation :
About Windows File System
What is file system? Have you ever paid attention to it? This article aims to introduce Windows file system to you.
In computing, file system controls how data is stored and retrieved. In other words, it is the method and data structure that an operating system uses to keep track of files on a disk or partition.
It separates the data we put in computer into pieces and gives each piece a name, so the data is easily isolated and identified.
Without file system, information saved in a storage media would be one large body of data with no way to tell where the information begins and ends.
Types of Windows File System
Knowing what is file system, let’s learn about the types of Windows file system.
There are five types of Windows file system, such as FAT12, FAT16, FAT32, NTFS and exFAT. Most of us like to choose the latter three, and I would like to introduce them respectively for you.
FAT32 in Windows
In order to overcome the limited volume size of FAT16 (its supported maximum volume size is 2GB) Microsoft designed a new version of the file system FAT32, which then becomes the most frequently used version of the FAT (File Allocation Table) file system.
NTFS in Windows
NTFS is the newer drive format. Its full name is New Technology File System. Starting with Windows NT 3.1, it is the default file system of the Windows NT family.
Microsoft has released five versions of NTFS, namely v1.0, v1.1, v1.2, v3.0, and v3.1.
exFAT in Windows
exFAT (Extended File Allocation Table) was designed by Microsoft back in 2006 and was a part of the company’s Windows CE 6.0 operating system.
This file system was created to be used on flash drives like USB memory sticks and SD cards, which gives a hint for its precursors: FAT32 and FAT16.
Comparisons among the Three Types of Windows File System
Everything comes in advantages and shortcomings. Comparisons among the three types of Windows File System will be showed in following content to help you make a choice about selecting one type of file system.
Compatibility
The three types can work in all versions of Windows.
For FAT32, it also works in game consoles and particularly anything with a USB port; for exFAT, it requires additional software on Linux; for NTFS, it is read only by default with Mac, and may be read only by default with some Linux distributions.
With respect to the ideal use, FAT32 is used on removable drives like USB and Storage Card; exFAT is used for USB flash drives and other external drivers, especially if you need files of more than 4 GB in size; NTFS can be used for servers.
Security
The files belonging to FAT32 and NTFS can be encrypted, but the flies belong to the latter can be compressed.
The encryption and compression in Windows are very useful. If other users do not use your user name to login Windows system, they will fail to open the encrypted and compressed files that created with your user name.
In other word, after some files are encrypted, such files only can be opened when people use your account to login Windows system.
Supported Volume Size
For FAT32, the partition size is no larger than 2TB, which means you cannot format a hard drive larger than 2TB as a single FAT32 partition. NTFS allows you use 64KB clusters to achieve a 256TB volume. In theory, you can achieve a 16EB volume of exFAT.
Supported File Size
For FAT32, it fails to support the single files whose size is over 4GB, while NTFS file system can support the size of single file more than 4GB, and for exFAT, the maximum size of single file, in theory, is 16EB.
In conclusion, compared with NTFS and exFAT, FAT32 comes in higher compatibility in old operating systems and removable storage devices, whereas its features limit in single file size and partition size.
Compared with FAT32 and exFAT, NTFS surpasses in security. And exFAT features larger volume volume size and single file size.
File System Conversion
Maybe you already have a hard drive featuring FAT32 or NTFS file system, and you want to make a conversion. In this situation, you can download MiniTool Partition Wizard to help you complete this conversion.
How to Change the File System without Formatting in Windows
The file system of a drive is what decides how the files will be structured on your computer. There are multiple file systems that you can use for your drives and each one has its own advantages and disadvantages.
When you’ve just bought a new computer, you can open the partition manager and format the drives in the file system you want. For example, if you wish for your drives to use the NTFS file system, then you can select that option in the partition manager and it will format the drive accordingly.
Sometimes, some tasks will even require you to be using a specific file system. If it’s a new drive you’re working on, you can just format it and it can have a new file system. However, if there’s a lot of data stored on the drive, then it will all be lost during the formatting process.
Do you wish if there was a way you could change the file system of a drive without actually formatting the drive? Well, there is.
Using the command line prompt, you can easily convert the file system of a drive to another format without the loss of any data. The following guide shows how it’s done so you can do it for yourself on your computer.
Changing the File System without Formatting in Windows
To do the task, you are going to be using the command prompt to issue commands on your computer. The first thing you’ll need to do is open the command prompt which can be done by running Run and typing in cmd and hitting enter.
When it opens, type in the following command and hit enter on your keyboard:
convert drive_letter: /fs:ntfs
In the above command, make sure to replace drive_letter with the actual letter of the drive whose file system you wish to change. The command will change the file system from FAT to NTFS. Bear in mind that there is no reverse going. Once you’ve run this command, you will not be able to go back to FAT or FAT32 without losing the data.
Changing the File System using a Software
If you are not comfortable to use command prompt to execute commands and change file system, and looking for a easier method to change file system. I will recommend you a free partition manager. The downside is that you have to bear data loss.
Before you begin, we’d like to advise you that no matter what precautions you take, sometimes you have to suffer the data loss. This could be due to many reasons and the best way to resolve it is to use data recovery software. Fortunately, there are tons of such software in the market and one of them is 4DDiG for Windows Data Recovery.
You just need to download the software to your computer and instruct it to scan your drives to see if any of your lost files can be recovered. After it has scanned your drives, it will show what it can recover for you.
Now that you know how to recover data if there’s any data loss, let’s see how to use an app to change the file system of a drive without formatting it.
Head over to download the partition tool. Open the software and choose Format. Select the drive that you’d like to format. In the window you can switch to another file system for this drive.
We hope this guide helps you change the file system of a drive without formatting it on your Windows based computer.
Updated on 2019-07-25 / Update for Data Recovery
File path formats on Windows systems
Members of many of the types in the System.IO namespace include a path parameter that lets you specify an absolute or relative path to a file system resource. This path is then passed to Windows file system APIs. This topic discusses the formats for file paths that you can use on Windows systems.
Traditional DOS paths
A standard DOS path can consist of three components:
- A volume or drive letter followed by the volume separator ( : ).
- A directory name. The directory separator character separates subdirectories within the nested directory hierarchy.
- An optional filename. The directory separator character separates the file path and the filename.
If all three components are present, the path is absolute. If no volume or drive letter is specified and the directory name begins with the directory separator character, the path is relative from the root of the current drive. Otherwise, the path is relative to the current directory. The following table shows some possible directory and file paths.
Path | Description |
---|---|
C:\Documents\Newsletters\Summer2018.pdf | An absolute file path from the root of drive C: . |
\Program Files\Custom Utilities\StringFinder.exe | An absolute path from the root of the current drive. |
2018\January.xlsx | A relative path to a file in a subdirectory of the current directory. |
..\Publications\TravelBrochure.pdf | A relative path to file in a directory that is a peer of the current directory. |
C:\Projects\apilibrary\apilibrary.sln | An absolute path to a file from the root of drive C: . |
C:Projects\apilibrary\apilibrary.sln | A relative path from the current directory of the C: drive. |
Note the difference between the last two paths. Both specify the optional volume specifier ( C: in both cases), but the first begins with the root of the specified volume, whereas the second does not. As result, the first is an absolute path from the root directory of drive C: , whereas the second is a relative path from the current directory of drive C: . Use of the second form when the first is intended is a common source of bugs that involve Windows file paths.
You can determine whether a file path is fully qualified (that is, it the path is independent of the current directory and does not change when the current directory changes) by calling the Path.IsPathFullyQualified method. Note that such a path can include relative directory segments ( . and .. ) and still be fully qualified if the resolved path always points to the same location.
The following example illustrates the difference between absolute and relative paths. It assumes that the directory D:\FY2018\ exists, and that you haven’t set any current directory for D:\ from the command prompt before running the example.
If you would like to see code comments translated to languages other than English, let us know in this GitHub discussion issue.
UNC paths
Universal naming convention (UNC) paths, which are used to access network resources, have the following format:
- A server or host name, which is prefaced by \\ . The server name can be a NetBIOS machine name or an IP/FQDN address (IPv4 as well as v6 are supported).
- A share name, which is separated from the host name by \ . Together, the server and share name make up the volume.
- A directory name. The directory separator character separates subdirectories within the nested directory hierarchy.
- An optional filename. The directory separator character separates the file path and the filename.
The following are some examples of UNC paths:
Path | Description |
---|---|
\\system07\C$\ | The root directory of the C: drive on system07 . |
\\Server2\Share\Test\Foo.txt | The Foo.txt file in the Test directory of the \\Server2\Share volume. |
UNC paths must always be fully qualified. They can include relative directory segments ( . and .. ), but these must be part of a fully qualified path. You can use relative paths only by mapping a UNC path to a drive letter.
DOS device paths
The Windows operating system has a unified object model that points to all resources, including files. These object paths are accessible from the console window and are exposed to the Win32 layer through a special folder of symbolic links that legacy DOS and UNC paths are mapped to. This special folder is accessed via the DOS device path syntax, which is one of:
In addition to identifying a drive by its drive letter, you can identify a volume by using its volume GUID. This takes the form:
DOS device path syntax is supported on .NET implementations running on Windows starting with .NET Core 1.1 and .NET Framework 4.6.2.
The DOS device path consists of the following components:
The device path specifier ( \\.\ or \\?\ ), which identifies the path as a DOS device path.
The \\?\ is supported in all versions of .NET Core and .NET 5+ and in .NET Framework starting with version 4.6.2.
A symbolic link to the «real» device object (C: in the case of a drive name, or Volume
The first segment of the DOS device path after the device path specifier identifies the volume or drive. (For example, \\?\C:\ and \\.\BootPartition\ .)
There is a specific link for UNCs that is called, not surprisingly, UNC . For example:
For device UNCs, the server/share portion forms the volume. For example, in \\?\server1\e:\utilities\\filecomparer\ , the server/share portion is server1\utilities . This is significant when calling a method such as Path.GetFullPath(String, String) with relative directory segments; it is never possible to navigate past the volume.
DOS device paths are fully qualified by definition. Relative directory segments ( . and .. ) are not allowed. Current directories never enter into their usage.
Example: Ways to refer to the same file
The following example illustrates some of the ways in which you can refer to a file when using the APIs in the System.IO namespace. The example instantiates a FileInfo object and uses its Name and Length properties to display the filename and the length of the file.
Path normalization
Almost all paths passed to Windows APIs are normalized. During normalization, Windows performs the following steps:
- Identifies the path.
- Applies the current directory to partially qualified (relative) paths.
- Canonicalizes component and directory separators.
- Evaluates relative directory components ( . for the current directory and .. for the parent directory).
- Trims certain characters.
This normalization happens implicitly, but you can do it explicitly by calling the Path.GetFullPath method, which wraps a call to the GetFullPathName() function. You can also call the Windows GetFullPathName() function directly using P/Invoke.
Identify the path
The first step in path normalization is identifying the type of path. Paths fall into one of a few categories:
- They are device paths; that is, they begin with two separators and a question mark or period ( \\? or \\. ).
- They are UNC paths; that is, they begin with two separators without a question mark or period.
- They are fully qualified DOS paths; that is, they begin with a drive letter, a volume separator, and a component separator ( C:\ ).
- They designate a legacy device ( CON , LPT1 ).
- They are relative to the root of the current drive; that is, they begin with a single component separator ( \ ).
- They are relative to the current directory of a specified drive; that is, they begin with a drive letter, a volume separator, and no component separator ( C: ).
- They are relative to the current directory; that is, they begin with anything else ( temp\testfile.txt ).
The type of the path determines whether or not a current directory is applied in some way. It also determines what the «root» of the path is.
Handle legacy devices
If the path is a legacy DOS device such as CON , COM1 , or LPT1 , it is converted into a device path by prepending \\.\ and returned.
A path that begins with a legacy device name is always interpreted as a legacy device by the Path.GetFullPath(String) method. For example, the DOS device path for CON.TXT is \\.\CON , and the DOS device path for COM1.TXT\file1.txt is \\.\COM1 .
Apply the current directory
If a path isn’t fully qualified, Windows applies the current directory to it. UNCs and device paths do not have the current directory applied. Neither does a full drive with separator C:\ .
If the path starts with a single component separator, the drive from the current directory is applied. For example, if the file path is \utilities and the current directory is C:\temp\ , normalization produces C:\utilities .
If the path starts with a drive letter, volume separator, and no component separator, the last current directory set from the command shell for the specified drive is applied. If the last current directory was not set, the drive alone is applied. For example, if the file path is D:sources , the current directory is C:\Documents\ , and the last current directory on drive D: was D:\sources\ , the result is D:\sources\sources . These «drive relative» paths are a common source of program and script logic errors. Assuming that a path beginning with a letter and a colon isn’t relative is obviously not correct.
If the path starts with something other than a separator, the current drive and current directory are applied. For example, if the path is filecompare and the current directory is C:\utilities\ , the result is C:\utilities\filecompare\ .
Relative paths are dangerous in multithreaded applications (that is, most applications) because the current directory is a per-process setting. Any thread can change the current directory at any time. Starting with .NET Core 2.1, you can call the Path.GetFullPath(String, String) method to get an absolute path from a relative path and the base path (the current directory) that you want to resolve it against.
Canonicalize separators
All forward slashes ( / ) are converted into the standard Windows separator, the back slash ( \ ). If they are present, a series of slashes that follow the first two slashes are collapsed into a single slash.
Evaluate relative components
As the path is processed, any components or segments that are composed of a single or a double period ( . or .. ) are evaluated:
For a single period, the current segment is removed, since it refers to the current directory.
For a double period, the current segment and the parent segment are removed, since the double period refers to the parent directory.
Parent directories are only removed if they aren’t past the root of the path. The root of the path depends on the type of path. It is the drive ( C:\ ) for DOS paths, the server/share for UNCs ( \\Server\Share ), and the device path prefix for device paths ( \\?\ or \\.\ ).
Trim characters
Along with the runs of separators and relative segments removed earlier, some additional characters are removed during normalization:
If a segment ends in a single period, that period is removed. (A segment of a single or double period is normalized in the previous step. A segment of three or more periods is not normalized and is actually a valid file/directory name.)
If the path doesn’t end in a separator, all trailing periods and spaces (U+0020) are removed. If the last segment is simply a single or double period, it falls under the relative components rule above.
This rule means that you can create a directory name with a trailing space by adding a trailing separator after the space.
You should never create a directory or filename with a trailing space. Trailing spaces can make it difficult or impossible to access a directory, and applications commonly fail when attempting to handle directories or files whose names include trailing spaces.
Skip normalization
Normally, any path passed to a Windows API is (effectively) passed to the GetFullPathName function and normalized. There is one important exception: a device path that begins with a question mark instead of a period. Unless the path starts exactly with \\?\ (note the use of the canonical backslash), it is normalized.
Why would you want to skip normalization? There are three major reasons:
To get access to paths that are normally unavailable but are legal. A file or directory called hidden. , for example, is impossible to access in any other way.
To improve performance by skipping normalization if you’ve already normalized.
On .NET Framework only, to skip the MAX_PATH check for path length to allow for paths that are greater than 259 characters. Most APIs allow this, with some exceptions.
.NET Core and .NET 5+ handles long paths implicitly and does not perform a MAX_PATH check. The MAX_PATH check applies only to .NET Framework.
Skipping normalization and max path checks is the only difference between the two device path syntaxes; they are otherwise identical. Be careful with skipping normalization, since you can easily create paths that are difficult for «normal» applications to deal with.
Paths that start with \\?\ are still normalized if you explicitly pass them to the GetFullPathName function.
You can pass paths of more than MAX_PATH characters to GetFullPathName without \\?\ . It supports arbitrary length paths up to the maximum string size that Windows can handle.
Case and the Windows file system
A peculiarity of the Windows file system that non-Windows users and developers find confusing is that path and directory names are case-insensitive. That is, directory and file names reflect the casing of the strings used when they are created. For example, the method call