Web design, renaming of files
Anybody got an easy way to rename 1800 html files. Im thinking software here. Cause if I change the filenames the links in the rest of the html files will also have to change. Given a small project, but its a pain in the ass. They want to organise their website, rename files so someone there can update their website. Last web designer (used framesets, mostly plaintext pages with a few pictures here and there) just left files all over the place with weird names, person updating isnt all that computer savy so it needs to be organised and logical for her to take it over.
Any ideas?
Any ideas?
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□What web design software are you using? Dreamweaver will update links when you rename or move a file. I believe you can download a 30 day trial from www.adobe.com if you don't have it.
edit: By links, I don't mean a link in the way they're traditionally thought of, but any reference to it in any file.
It sounds like you're going to have to rename the files manually because you're going to have to look at them and give them a meaningful name, right? I can't think of a way you can automate it more than what I suggested. -
Darthn3ss Member Posts: 1,096wow, have fun with that one!Fantastic. The project manager is inspired.
In Progress: 70-640, 70-685 -
Slowhand Mod Posts: 5,161 ModConsidering you'd have to probably script the changing of the actual filenames, as well as update the HTML, maybe it's time to take up .NET. . .
Free Microsoft Training: Microsoft Learn
Free PowerShell Resources: Top PowerShell Blogs
Free DevOps/Azure Resources: Visual Studio Dev Essentials
Let it never be said that I didn't do the very least I could do. -
liven Member Posts: 918most folks will poo poo this idea,
but I would script perl to recurse through all the directories and rename the files.
You have much flexibility with this option.
Recently I wrote a script that process dtata. It parses all directories in a given folder and reads the content out of the .xml files. You can easy make the path, files, and extension dynamic!!!encrypt the encryption, never mind my brain hurts. -
Slowhand Mod Posts: 5,161 Modliven wrote:most folks will poo poo this idea,
but I would script perl to recurse through all the directories and rename the files.
You have much flexibility with this option.
Recently I wrote a script that process dtata. It parses all directories in a given folder and reads the content out of the .xml files. You can easy make the path, files, and extension dynamic!!!
Yup. The general consensus is, no matter what language you decide to use, you're looking at some scripting if you want to avoid a few weeks' worth of changing code and file-names by hand.
Free Microsoft Training: Microsoft Learn
Free PowerShell Resources: Top PowerShell Blogs
Free DevOps/Azure Resources: Visual Studio Dev Essentials
Let it never be said that I didn't do the very least I could do. -
dynamik Banned Posts: 12,312 ■■■■■■■■■□Remember, there is a lot more involved than just renaming the files. Each html file will have dozens of references to images, other html files, css, js, etc. If you change one file name, you have to also go through and update that reference in every other file that uses it, otherwise you will destroy the site and end up with a bigger problem than you have now.
Like I said earlier, I'm pretty sure this is going to involve a lot of manual work as well. You have to open up 124sdf8.jpg to see what it is, and then rename it background-tile-left.jpg or whatever. Dreamweaver (and I'm sure others) will update the references for you, but I can't see a way that you will be able to automate this completely. -
hetty Member Posts: 394I thought id hold off posting an update until I got a start on it.
Thanks for the reminder dynamic, I havent used dreamweaver since version 3 or 4 and that was a long time ago. I tried it but renaming of the files didnt seem to woek for me. I dont really know any scripting at all and maybe this is something which would make things alot easier I dont know.
But anyway, I got a start with a few hours here and there over the last few days. Maybe 4 or 5 altogether. Renamed most of the menu system and got that tidyied up. I manually edited the pages in notepad (hardcore!) and use the replace item in the edit menu for someof it which speeded it up a bit. I know there must be a quicker way of doing this but slow and steady will do me the course (paid by the hour!). Client is happy with it also and just wants to get the mess sorted out and the website updated once and for all. I would go with a new website but the client is happy with design and layout so what do i know. Ive about 400 of the files sorted out of the 1800 so far. Its looking at about 2 to 2.5 days of 8 hours a day to sort it out but im spreading it over the next week or so, whenever i get some down time. -
dynamik Banned Posts: 12,312 ■■■■■■■■■□Did you make a new site in Dreamweaver and point it at the root of the site? You need to do that so it will index all the files. If you just open them up and edit them randomly, it won't provide that functionality. PM or post if you have any problems. It'll definitely save you a lot of time.
The only reason I discouraged the scripting suggestion is because you have to inspect each file individually in order to give it a meaningful name. I don't see how you can automate that.
Notepad is definitely hardcore. You might want to give Notepad++ a shot though since it does syntax highlighting and things like that: http://notepad-plus.sourceforge.net/uk/site.htm That might make things a little easier on you. -
hetty Member Posts: 394dynamik wrote:The only reason I discouraged the scripting suggestion is because you have to inspect each file individually in order to give it a meaningful name. I don't see how you can automate that.dynamik wrote:Notepad is definitely hardcore. You might want to give Notepad++ a shot though since it does syntax highlighting and things like that: http://notepad-plus.sourceforge.net/uk/site.htm That might make things a little easier on you.