Windows 10 Case-sensitive file names in Windows' Linux subsystem

oz1cz

New Member
Joined
Oct 30, 2018
Messages
3
I'm running Windows 10 and I frequently use the Linux subsystem on Windows.

If I use the Linux system to create a folder, the file names in that folder will be case sensitive. This will sometimes confuse Windows programs that access the folder.

Is there a simple way to modify a Linux folder in Windows so that its file names are no longer case sensitive?
 


Solution
Looks like if you try to set it on normal Windows directories it returns "not supported", but you can try the following for your lxsss directories
Obviously change the $RootPath = to your location

Code:
$RootPath = "C:\Windows\Temp"

$Directories = Get-ChildItem -Path $RootPath -Directory -Recurse

Foreach($Dir in $Directories)
{
    fsutil.exe file SetCaseSensitiveInfo "$($Dir.FullName)"
}
Thank you, Neemobeer.

The Windows "fsutil" utility can change the case sensitivity of file names in a single directory, but it won't recurse through a directory tree. I guess your answer means that recursion is not possible.
 


They must of added that for lxss sub system. You could couple that with powershell and recursively set it then
 


Looks like if you try to set it on normal Windows directories it returns "not supported", but you can try the following for your lxsss directories
Obviously change the $RootPath = to your location

Code:
$RootPath = "C:\Windows\Temp"

$Directories = Get-ChildItem -Path $RootPath -Directory -Recurse

Foreach($Dir in $Directories)
{
    fsutil.exe file SetCaseSensitiveInfo "$($Dir.FullName)"
}
 


Solution
Back
Top