Jump to content

How to get meta tag data from files


ember

Recommended Posts

Hello everyone,i was wondering if someone could explain me how to get some meta infoon a number of files, such as author and owner.it is for a .asp web page wich indexes a list of files and shows infoabout those files (name, type, date last modified, etc) so that whoaccesses the page can sort those files by the detail they wish, and ican't discover how to get the author and owner info about those files.thanks in advance,ember

Link to comment
Share on other sites

thanks, it worked just fine =)but there are 2 little things:1st, it only works with physical drives, and i need it to work with virtual drives and relative paths.2nd, i need to have a sort of the files.any ideas?i found a script that solved these problems, but it doens't show the attributes i need, and I don't know how to "mix" them together...if needed i'll provide the code i'm using.thanks everyone,ember

Link to comment
Share on other sites

thanks!here it goes:<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><% filesz = 0 fileown = 8 srv = Request.ServerVariables("SERVER_SOFTWARE") if instr(srv,"/5.0")>0 then filesz = 1 filecr = 6 fileac = 7 fileat = 10 elseif instr(srv,"/5")>0 or instr(srv,"/6")>0 then filesz = 1 filecr = 4 fileac = 5 fileat = 9 end if if filesz > 0 then folder = "C:\Documents and Settings\bb79brg\Desktop\" response.write "<b>File listing for " & folder & "</b><p>" response.write "<table border=0 cellpadding=5 cellspacing=1 align=center>" response.write "<tr>" response.write "<th bgcolor=#CECFCE align=center>Nome</th>" response.write "<th bgcolor=#CECFCE align=center>Tipo</th>" response.write "<th bgcolor=#CECFCE align=center>Tamanho</th>" response.write "<th bgcolor=#CECFCE align=center>Última Modificação</th>" response.write "<th bgcolor=#CECFCE align=center>Proprietário</th>" response.write "<th bgcolor=#CECFCE align=center>Autor</th>" response.write "</tr>" tds = "<td><nobr> " tde = " </nobr></td>" Set sh = CreateObject("Shell.Application") set fl = sh.Namespace(folder) for each f in fl.Items if not f.IsFolder then p = f.path fn = right(p, len(p)-instrRev(p,"\")) response.write "<tr>" & _ tds & fn & tde & _ tds & f.type & tde & _ tds & fl.GetDetailsOf(f,filesz) & tde & _ tds & f.modifyDate & tde & _ tds & fl.GetDetailsOf(f,fileown) & tde & _ tds & fl.GetDetailsOf(f,fileat) & tde & _ "</tr>" end if next set fl = nothing set sh = nothing response.write "</table>" else response.write "Unable to process results." end if %> </body></html>thanks in advance :)

Link to comment
Share on other sites

hello!there are developments!i made it to adapt the script to work with virtual directories, but there is a misshap that i dont understand:when calling the "CreateObject(Shell.Application)" instead of, i.e., returning the date created (12-05-2004) it returns the name of the object ("date created" instead of "12-05-2004"). what could be causing this?thanks in advance,ember

Link to comment
Share on other sites

Your lines have this syntax:tds & fl.GetDetailsOf(f,filesz) & tde & _ tds & f.modifyDate & tde & _ tds & fl.GetDetailsOf(f,fileown) & tde & _ tds & fl.GetDetailsOf(f,fileat) & tde & _So maybe try this instead:tds & fl.GetDetailsOf(f,filesz) & tde & _ tds & fl.GetDetailsOf(f,filecr) & tde & _ tds & fl.GetDetailsOf(f,fileown) & tde & _ tds & fl.GetDetailsOf(f,fileat) & tde & _

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...