How to find surplus unlinked images

K

KiwiBrian

Assume that I have a html file that has internal links to 100 images which
are in a daughter folder.
This daughter folder has an extra 500 unrequired images.
How could I make a list of the filenames of the unrequired, or the required,
images.
 
S

Sherm Pendley

KiwiBrian said:
Assume that I have a html file that has internal links to 100 images which
are in a daughter folder.
This daughter folder has an extra 500 unrequired images.
How could I make a list of the filenames of the unrequired, or the required,
images.

Sounds like a job for Perl to me. To be fair, Ruby or Python could do
the job just as well, but I know Perl a lot better. :)

First, parse the HTML and walk through it, keeping a list of all the
images it references. Then, walk through a directory listing of the
child directory; for each of the images, check to see if its in the
list of images you built in the first step.

sherm--
 
N

Nico Schuyt

KiwiBrian said:
Assume that I have a html file that has internal links to 100 images
which are in a daughter folder.
This daughter folder has an extra 500 unrequired images.
How could I make a list of the filenames of the unrequired, or the
required, images.

I did that a couple of days ago:
1. Move all images to another directory
2. Open the page in FireFox and activate 'Display image paths' in the web
developer toolbar (plugin)
3. Open Explorer next to Firefox
4. Drag the missing images to the image directory

Alternative: run Xenu (http://home.snafu.de/tilman/xenulink.html) after step
one to get a list of the necessary images
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top