homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Spaces in filename - Potential problem?
I have PDFs that have spaces in the name

 4:32 pm on Nov 27, 2007 (gmt 0)

I have several PDFs that I have to serve up and the current filenames have multiple spaces in the name like "ABC Widget Spec Sheet.pdf" and I don't want to rename which would make for confusion. Am I going to run into any problems serving these pages(Apache 1.3)? My experience tells me no, but is there any browser specific issues (or any other issues for that matter) that I might run into?



 7:08 pm on Nov 27, 2007 (gmt 0)

Well, modern browsers and file systems **will** correctly connect with file names with spaces, but IMO it's still a bad idea.

<a href="ABC Widget Spec Sheet.pdf">See PDF</a>

When you follow this link, here's what appears in the address bar, or the URL that gets bookmarked:


Uhhhhg-Leeee. It's just a sloppy way to work. If you like the file-name recognition, use underscores or dashes:



 2:33 pm on Nov 28, 2007 (gmt 0)

I agree that the %20 is ugly, but I do have many files that I would have to replace the spaces with dashes - anyone have a perl one-liner or command line command to replace all spaces with dashes by any chance?


 2:56 pm on Nov 28, 2007 (gmt 0)

% rename 'tr/ /\-/' *

That did the trick on linux anyway.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved