To change a directory in the Windows file system back to the case-insensitive default (FOO = foo), run PowerShell as Administrator and use the command: fsutil.exe file setCaseSensitiveInfo disableĪ directory must be empty in order to change the case sensitivity flag attribute on that directory. To change a directory in the Windows file system so that it is case-sensitive (FOO ≠ foo), run PowerShell as Administrator and use the command: fsutil.exe file setCaseSensitiveInfo enable See the troubleshooting section for more about this. Changing the case-sensitivity flag also requires “Write attributes”, “Create files”, “Create folders” and “Delete subfolders and files” permissions on the directory. The value of this attribute will be 0 for case insensitive directories, and 1 for case sensitive directories.Ĭhanging the case-sensitivity of a directory requires that you run elevated permissions (run as Administrator). ![]() Case sensitivity is exposed using an extended attribute named l_case_sensitive. In Windows 10, build 17692, support was updated to include inspecting and modifying the case sensitivity flag for a directory from inside WSL. Support for per-directory case sensitivity began in Windows 10, build 17107. For a directory in the Windows (NTFS) file system, the will look like: C:\Users\user1\case-test or if you are already in the user1 directory, you could just run: fsutil.exe file setCaseSensitiveInfo case-test Modify case sensitivity To check if a directory is case sensitive in the Windows filesystem, run the command: fsutil.exe file quer圜aseSensitiveInfo This can make it difficult to work with Windows tools in case sensitive directories, so exercise caution when changing Windows file system case-sensitivity settings. Additionally, if Windows applications create new directories in a directory tree where you are using case sensitive files, these directories are not case sensitive. In directories marked as case sensitive, this means that these applications can no longer access the files. For example, it’s not uncommon for applications to transform filenames to use all upper or lower case. Some Windows applications, using the assumption that the file system is case insensitive, don’t use the correct case to refer to files. When working in the WSL file system, you are running Linux, thus files and directories are treated as case-sensitive by default. This may be especially true when mounting drives to the Windows Subsystem for Linux (WSL) file system. While the standard behavior is to be case-insensitive, you can assign an attribute flag to make a directory case sensitive, so that it will recognize Linux files and folders that may differ only by case. The Windows file system supports setting case sensitivity with attribute flags per directory. FOO.txt and foo.txt will be treated as distinct files. ![]()
0 Comments
Leave a Reply. |