Forum Moderators: open

Message Too Old, No Replies

Software needed to fix a site

         

stuartc1

12:48 pm on Sep 6, 2005 (gmt 0)

10+ Year Member



Hi,

My mum has spent about 5 months working on a website using dreamweaver. I told her it was pretty easy to use and though nothing of it. I've just received the site on CD but noticed she has hundreds of links and file/folder names with spaces :( - I forgot to mention things like this.

Anyway, Im looking to see if anyone knows of any software which can convert spaces in link/files/folder to the - (dash)?

There are thousands of pages and files and doing this manually would be a real set back.

If not, I guess I could probably whip up a PHP script to do it - but if there is something available I do not want to reinvent the wheel :)

DerekH

8:28 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure why your problem is so massive....

If you have a dozen files/folders with spaces in their names and several hundred links to those files, then Dreamweaver itself will do all you need - simply rename the file or folder in the Site Files window and Dreamweaver will fix all the links.

Surely, if your Mum is a webmaster novice, she won't have manually typed up a set of ten thousand files? If she's produced the content manually, the effort to change the filenames (not any of the content) in Dreamweaver will be miniscule in comparison!

A space, by the way, isn't an illegal character in a URL.
DerekH

stuartc1

12:34 pm on Sep 7, 2005 (gmt 0)

10+ Year Member



Its not a massive problem, no - but it is a job which would take several days of solid work to fix. I just wondered if there was software out there that can do this kind of thing.
Manually renaming the files will not update the links, and vise versa. I know dreamweaver can do a find and replace of the source within folders, but I dont believe it supports regualar expressions... which is required - doing a find for ' ' and replace with '-' will completely mess up everyfile... it needs to look for the value of href, img, src etc..

spaces are not illegal, no, but they do cause problems with some browsers and search engine bots - or so I am made to believe. If this is not the case please enlighting me.

Anyway, I've create a script with regular expressions to fix the code and the filenames/folders.... just needs a few tweeks.

stuartc1

12:39 pm on Sep 7, 2005 (gmt 0)

10+ Year Member



Just to add to that.... having spaces in filenames causes problems when it comes to FTP... Im sure when FTP finds a space, it truncates the name... which is a serious problem in my books.

DerekH

5:59 pm on Sep 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello again Stuartc1
I know dreamweaver can do a find and replace of the source within folders, but I dont believe it supports regualar expressions

What version of DreamWeaver are you using?
My Find and Replace dialogue has a tick box captioned "use regular expressions" which is what you said it can't do.

DerekH

ozon59

6:58 am on Sep 26, 2005 (gmt 0)

10+ Year Member



white spaces in filenames or else can easily be replaced with %20 and, this way, it is browser friendly.