Help me get my images back online
January 25, 2008 10:44 AM   Subscribe

I'm looking for software or a service that will spider my blog and return a report of all broken image links.

Due to a billing problem with an expired credit card, my hosting account was closed, and all of the images I'd uploaded to it were lost.

I still have the images locally, but I had hundreds of them on my blog, and I used a directory structure like /continent/country/StateOrRegion/city/SiteName/SiteName_[some numbers].jpg for storing my images. I need to find a tool that will list all of the broken images links for me so I can recreate the correct directory structure.

Bonus points for a tool that will help automate FTP'ing the images back to the correct directories (the image names on my local hard drive are the same as the ones on the server, but the directory structure is different).
posted by syzygy to Technology (5 answers total) 5 users marked this as a favorite
 
The best, fastest, damned link checker out there is Xenu (hilarious name, I know). Sadly, it has no functionality for actually fixing your links.
posted by General Malaise at 11:12 AM on January 25, 2008


Try Xenu:

http://home.snafu.de/tilman/xenulink.html
posted by justkevin at 11:13 AM on January 25, 2008


Thanks, both of you, for the Xenu recommendation - works like a charm. I'll wait on marking a best answer, though, in hopes that someone can help me with the second part of my question.

Details: I now have a list of all broken image links (1339!) on my blog. What's the easiest way to automate moving my pictures from my hard drive to my FTP server? Each broken image link has the full directory and the image name. As I mentioned earlier, I have all of the images on my local hard drive, and they have the same names as in the broken link report, just not the same directory structure.

I can script my own tool, if there's nothing pre-packaged that will do what I need. Maybe someone can point me to articles or resources that would give me a jump start here. I'd prefer to script in javascript or vbscript.
posted by syzygy at 11:58 AM on January 25, 2008


I believe that the simplest fix is to locally build a directory structure that mirrors your old image directories, then move the images into the right directories, then upload the whole structure to the right spot on your server. You could also test this way locally if you make a local version of the website.

Even though there's nearly 1400 images, if there's just a few directories it might take just a couple hours to hand-move the images to the right folders, using the broken link list and sorting strategically.

Otherwise, you could beat the link list into a list of where to move each image, and write a simple mover script or app.

I suppose one could even make the broken link list into a big DOS batch file of 1400 move statements.

javascript & vbscript aren't capable of reading/writing/moving files I believe. I would use one of perl, php, Java, C, C# to write a small app, depending on my mood, and what app fragments I have lying around. I'm a huge fan of the O'Reilly "Cookbook" books because they're usually full of clever recipes for these sorts of situations.
posted by Artful Codger at 1:13 PM on January 25, 2008


Great idea, Artful Codger, to recreate the directory structure. Doing it manually would be hell, though, as I have a huge directory structure on the server. I was thinking I'd have to do the FTP'ing from inside my script, as well.

But I think you're right - it should be easier to create the structure locally and use an FTP tool to move the whole structure into my new hosted space, then to write a script that handles the FTPing as well.

I'm pretty sure Javascript and VBScript will do what I need, in regards to creating the directories and copying the files (just not from within an html file - hta might work in IE, or I may run it in a console). On the other hand, DOS batch file is another good possibility.

Thanks all! I should have asked a long time ago...
posted by syzygy at 1:31 PM on January 25, 2008


« Older Shock and awe and so many footnotes   |   Podcasts audience sizes Newer »
This thread is closed to new comments.