rejetto forum

%20 in files list

0 Members and 1 Guest are viewing this topic.

Offline MitchSavage

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Hello All....
New to HFS, but am thoroughly enjoying using it....  Performs GREAT !!!  Many thanks to the author of this great program....  Somewhere I missed something.....   I have about 8,000 MP3's on my server....  HFS does in fact show them all correctly in the folder view when a user is logged onto HFS.  However; when the file list is clicked by the user, %20 is substituted for spaces in the file names....  That is the only thing with HFS that I have not been able to fix.....  I am using HFS version 2.1d build 088.... Any help or pointers anyone can provide on this would be much appreciated>>>>
Best Regards,
Mitch Savage


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
the space is not a valid character for urls.
invalid characters are encoded using the % sign.
there is an option "encode spaces", but it does not affect the "file list" link, because it is meant to be used by download managers and similar, not by humans.

what's the use you meant to do of it, so that spaces were not encoded?


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
I don't know where you would use it for >_<

But here's the fix:

Just download this filelist.tpl and place it in the exact same folder (on your hard-drive) where HFS.EXE is located.



[attachment deleted by admin]


Offline MitchSavage

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Giant Eagle,
Thanks !!!  That is exactly what I wanted.....   REASON:  Most of my files in the directory have spaces in the filenames....   i.e.   Music Artist - This Great Song.mp3   .......   Using the default method when a user clicks on the file list link, here is what they get...   
Music%20Artist%20-%20This%20Great%20Song.mp3   .....  Makes it a bit difficult to read.....  Used your filelist.tpl and now it serves it right out with no %20, but instead a space in the right place....   I will try to get a little better grasp of the command structure....   Thanks a bunch for your help....
Best Regards,
Mitch Savage

P.S.  One of my users wanted a file list of all the mp3's without having to search through all of the artist directories....
« Last Edit: April 02, 2007, 06:58:41 PM by MitchSavage »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Makes it a bit difficult to read..... 

sure... but why would they want to read it, when they have the "normal" list before?


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
sure... but why would they want to read it, when they have the "normal" list before?

O.o yes, i dont understand that part too.

Anyway..

add '?recursive' to the address :)

http://localhost:8080/~files.lst?recursive <-- this will show 'all' the files and folders of the entire file server (Please note! this will cause a high cpu load on the server side!)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
i'm trying to understand if the "encode spaces" should affect the filelist too...  :-\


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
Seems to me that HFS is properly encoding the <space> to %20, but the browser used failed to decode the %20 to <space> again. Thus he got the filenames messed up with %20.

I just tested with FF 2.0.0.3 and IE 7.0 - here the results.

FF2 -> decoded %20 correctly, got exactly the same filename with spaces
IE7 -> erm this is really weird - IE7 substitutes every space encountered with an underscore...
     
      Test file with spaces.txt  downloaded as  Test_file_with_spaces.txt

To hell with IE.



MarkV
http://worldipv6launch.org - The world is different now.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile