Click to See Complete Forum and Search --> : Read variables from another page


shotsy247
04-03-2009, 01:42 PM
Hi All,

I am writing an app to search through my site directory and write all of the files to a xml file from which a site map will be created.

I found a nice little code snippet on Google Site Maps that does this just fine.

The issue is that I don't want all of the pages on my site added to the file. My thought was to place a variable on all of the pages I wanted included. Then when the code snippet, which uses the FileSystemObject and FileObject scans the site, I could check each page for this variable. If it was there, add it to the xml, if not then don't.

I looked at the methods available with the File Object and there don't seem to be any that wil accomplish this goal. The TextStream Object for example only seems to return something if it is visually part of the page, not the asp code.

Any help would be appriciated.

Thanks

_t

yamaharuss
04-04-2009, 05:09 PM
That's because it does not read the code, it only reads the output (or HTML)

Try using a meta tag.

shotsy247
04-15-2009, 07:50 AM
Sorry for the delay in responding. I got pulled in a different direction and am just getting back to this issue.

Could you please explain how I would use a meta tag to accomplish this?

Thanks.

_t

itHighway2007
04-15-2009, 01:00 PM
Use if condition with file name


Exmaple:
If NOT objFSO.FileName = "xyz.asp" then
- add files script
end if

shotsy247
04-17-2009, 06:01 AM
Hi It,

Thanks for the response, but that doesn't seem to apply to what we're talking about here . . . or at least what I'm trying to accomplish.

I have code that indexes my entire site and lists out all of the files. However I would like to limit the files it lists based on a variable or something placed on certain pages.

Does anyone know of a way I can do this?

Thanks.

_t

yamaharuss
04-17-2009, 07:32 AM
Like I said... you will need an html variable such as a meta tag or something else you can search within the page.

example

<META NAME="SEARCH_KEY" CONTENT="OFF">

shotsy247
04-17-2009, 07:48 AM
Hi yamaharuss,

I guess the part I'm unclear on is how I would search within the page. I had placed some meta tags within a test page but the TextStream did not see these.

Could you provide further guidance on how I would search for the meta tags?

Thank you.

_t