Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need case changer utility

Status
Not open for further replies.

crisco

Technical User
Jan 29, 2001
9
US
I am taking over a site from someone else and moving it to linux. It has mixed case everywhere!!! Links won't work and images won't show. I need a utility so I don't have to make all of the changes by hand. Any ideas??
 
you can use javascript to change case like this:

var someString="this IS SoME tEXt";

someString.toLowerCase();

someString.toUpperCase();

but I think that c++ would suit your purposes better. maybee perl. or, since you are on linux, could you use the command line scripts?

just some ideas Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
online.dll

AIM & MSN: robacarp
 
When the files are htmll files you can open them in Word.

In Word you can customize your toolbar and add the "Change Case"- button from the "format"-categorie. (there are 2 buttons, one without an icon and one with an icon. You need the one WITHOUT)

Then you select a word (dubble-click) or an whole sentence and click on the "Change Case" button. Click 3 times on this buttton and you'll see changing the text to - Uppercase - Lowercase - Sentence case -. Make your choise and click the next word. If you want you can do "select all" and change the whole file to lowercase.

Hope this helps,
Erik
 
If you employ and ASP script, you could change the case in all dialogue to UPPER CASE:

<%
Dim strBodyText
strBodyText = UCase(Request.Form(&quot;bodyofpage&quot;))
Response.Write(strBodyText)
%>


The above would be a server-side scripting solution, but you also might be able to get away with using client-side VBScript, but this would only make the change at runtime, meaning the changes would never actually be permanent, and the text would still be in mixed case, rendered only IN UPPER CASE.
 
oh, and I thought of another soloution. ultraedit is a very nice editor with case invert, and case convert. it is made for editing web files and programing files.


oh, and it costs $30 (U.S.) but has an eval period Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
online.dll

AIM & MSN: robacarp
 
Hmm. I don't think these guys know what you're after. Here's my own interpretation...

Somebody made a web site based upon MS tools and an MS server. MS web servers are case-insensitive, so these people went ahead and used mixed-case all over the place, in HREFs and SRCs and everything.

Furthermore, they weren't at all careful (or not careful enough) to AT LEAST use the same case mixing in their links and the actual folders and files on the web server, yielding messes like:
Code:
Server:  /Events/detail.htm
         /Events/ThisWeek.HTM
         /Events/LastWeek.htm
         /Events/month.htm
         /index.HTM
         /images/LilHorsey.gif
         /images/mailbox.GIF
         /images/Banner.GIF

Pages:   href=&quot;/events/Detail.htm&quot;
         src=&quot;/Images/Mailbox.gif&quot;
This amateurish mess (yeah, but we all do it) was accumulated over time. They got away with it because their MS (or MS-based) web server didn't care. The file system and web server lets a &quot;Banner.GIF&quot; reference find &quot;banner.gif&quot; without incident.

But now some &quot;King o' Cartoons&quot; you work for has been convinced by a marketeer (or religious vision) that this web site needs to be moved to a 'Nix box of some flavor. Oh yeah, you said Linux.

Well it won't work worth a crap there, because everytime you hit a spot where the original ding-dings didn't match cases properly you get a broken link. You need SOME way to clean it up, whether it is to LCase everything (references AND files/folders) or at least match the references to the real files.

Is that sort of where you're at?


I haven't found a standalone utility to do this, but I did stumble over a possible solution based on FrontPage.

If you have FrontPage 2000 or 2002 you can download an add-in called &quot;Case Changer&quot; from:


I know little more about it than that. The description is very brief:

Case Changer Add-in for FrontPage

Converts all files and folders to lower case.

This guy is a little vague about a lot of things, like whether this is freeware or a shareware limited-time demo!

Maybe it'll run long enough to get your site normalized though, and then you won't need it. If decide you do and he want's a little green for it permanently you can make the call on forking over after you've decided it meets your needs.

I hope it turns out to be helpful.
 
You are right it is a mess X-) This is an example where hand coding is not better!!!

I had thought of doing that. I could dump it into FrontPage run the case changer and then dump it into Dreamweaver and take out all of the excess FP code. I can change the file names simply by forcing lower case when I ftp but that doesn't help all of the mixed case in the code.

I am going to check out that add in more carefully and see if it actually changes the case in the references too.
 
Hand codeing, as I see it is better... for one solemn reason, you have total control over the code!! But just remember to save in lowercase format My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top