Network and Storage Protocols

Case sensitive file name in http protocol

YASIR_IRFAT
3,868 Views

I have enabled http protocol on my filer, and set the root directory path and it is working fine. But in folder under root folder (rootdirectory/videos) I have some video files (wmv), i am able to play them when i use,

http://servername/folder/filename.WMV

but when i try http://servername/folder/filename.wmv it does not play which shows that filenames are case sensitvite here. My problem is that the software that create these files put .WMV as their extension and I cant change it to use small case. While reading software uses filename.wmv. Is there any way I can tell HTTP protocol in use to ignore case so files could be played. Any help will be very appreciated.

1 ACCEPTED SOLUTION

columbus_admin
3,868 Views

You can't change HTTP to allow that.  However you could export or share the HTTP path out to another system and convert them via script.

Warning this will rename ALL files to lower case.  Test these in a non-production environment, while they may work for me and others, they may affect your workload in an unexpected way.

From a Unix/Linux host it is as simple as:  rename 'y/A-Z/a-z/' *

With a Windows batch file:  for /F %i in ('dir /b /l') do rename %i %i  <---hating the font here /l is ell, the letter after K and before M

for /F %i means for each file in the current directory assign it to the variable "i"

dir /b /l will output only the filenames and all in lowercase

do rename %i %i means rename the output of that dir /b /l from the current case output to the lowercase output.

- Scott

View solution in original post

3 REPLIES 3

Jeff_Yao
3,868 Views

filer is a unix based system.........i dont think you can do that......

columbus_admin
3,869 Views

You can't change HTTP to allow that.  However you could export or share the HTTP path out to another system and convert them via script.

Warning this will rename ALL files to lower case.  Test these in a non-production environment, while they may work for me and others, they may affect your workload in an unexpected way.

From a Unix/Linux host it is as simple as:  rename 'y/A-Z/a-z/' *

With a Windows batch file:  for /F %i in ('dir /b /l') do rename %i %i  <---hating the font here /l is ell, the letter after K and before M

for /F %i means for each file in the current directory assign it to the variable "i"

dir /b /l will output only the filenames and all in lowercase

do rename %i %i means rename the output of that dir /b /l from the current case output to the lowercase output.

- Scott

YASIR_IRFAT
3,868 Views

Thanks a lot for your replies.

I got the resolution through "Manage Translations" under HTTP configuration in Filer Web access. In my case, files in required directory gets added very quickly through a software (cant modify how it uses filenames while creation) and old files are removed. So there should have been a scheduled tasks doing naming conversion that could effect overall performance as mentioned by "columbus_admin"

In current resolution, I created a Translation of type "Map" and converted,

/folder/*.wmv

to

/folder/*.WMV

It worked because my problem was pretty static as I always wanted it to convert requested *.wmv to *.WMV" on storage.

Public