Generate directory listing with metadata, output to HTML

2

I'd like to generate an HTML view of my folders, with the ability to add metadata to the items. Things like a description, or other custom tags.

Anyone know of a utility for this.

Initially I thought of having:

folder\
  images\
    _meta.xml
    01.jpg

Then in _meta.xml you'd have

<files>
    <name>01.jpg</name>
    <description>Picture from some holiday</description>
    ...
</files>

And be able to generate something like

...
<li>Images</li>
<ul>
    <li>
        <span class="name" title="Picture from some holiday">01.jpg</span>
    </li>
</ul>
...

Any suggestions, or better ways of achieving this? It'll be Windows XP / 7.

jamiebarrow

Posted 2011-08-04T08:03:23.743

Reputation: 166

Answers

2

Just listing the files is relatively straightforward and could be done dozens of ways. Failing any more complex requirements, a good place to start would be windows powershell.

To be able to add metadata and tags to the files is alot trickier mainly because you need to create a database of some sort to hold the information about your files. And this application has to be smart enough to deal with scenarios like moving files to different locations or even file deletions.

All that said, most common file formats support some concept of metadata. JPEGs for example have EXIF which can include title. A better bet might be to populate that sort of data. Added bonus is the win7 shell and search features take advantage of this metadata for common file formats so payoff won't require development.

Wyatt Barnett

Posted 2011-08-04T08:03:23.743

Reputation: 121

Ja, I guess I'm just a bit too lazy to build that script :) Hence the question. I'm not tooo worried about the moving of files, because I'll aim to keep to a nicely managed structure, more worried about the listing of what's currently there + showing metadata. – jamiebarrow – 2011-08-04T09:53:06.940

0

Dir-To-List hasn't been updated in a long while but seems to be something along the lines of what you need.

CGA

Posted 2011-08-04T08:03:23.743

Reputation: 3 767

0

I think I've created something along the lines of what you've described.

It is a freeware hosted on GitHub here.

It is the script written in powershell that creates a html page of directory and ith subdirectories, creating an tile for every file in those directories. Files have different colors depending on their extension. Some of them can be viewed directly from the webpage if they can be handled by the browser.

The complete list of files that can be viewed in the browser by clicking on a tile:

txt,
cpp,
c,
hpp,
h,
gif,
tiff,
jpg,
jpeg,
png,
bmp,
pdf,
html,
htm

The output would look like this: enter image description here

Each tile contains data like: filename, file size, date of modification.

You can easily customize it the way you like it. The colors are defined in the CSS string at the beginning of the script.

I hope someone will find it useful.

mnmnc

Posted 2011-08-04T08:03:23.743

Reputation: 3 637