Help w/ FileSystemObject

Results 1 to 4 of 4

Thread: Help w/ FileSystemObject

  1. #1
    H.R. PuffNStuff Guest

    Default Help w/ FileSystemObject

    Unfortunately, I don&#039;t have any code to show because I&#039;m still trying to work this out in my head before I code it. <BR><BR>What I need to do is: <BR><BR>Open a page that lists all the files within an explicitly mapped folder on the server&#039;s hard drive. <BR><BR>Some of these files can be left as is and listed w/ their default name, but some need the ability to list a custom description and title. <BR><BR>The best way I can think of to do this (with my limited knowledge of the filesystemobject) to give the files that will have the custom descriptions a specific naming convention (using an underscore in the name = filename_.html). While looping through these files I can parse out the files w/ the underscore (_) character and then open a text file of the same exact name, for example: <BR><BR>filename_.html would have a description file called filename_.txt in a separate folder. <BR><BR>I can then read the custom title from the first line of the text file and the description from the second line and include this in the loop that is listing all of the files in the folder. <BR><BR>Any suggestions on how to put this together?? I&#039;ve been sitting here trying for hours but am at wits-end. <BR><BR>Please, I&#039;m going nuts here and have no time left to do a crash course on the FileSystemObject, any help would be seriously appreciated! <BR><BR>Thanks Guys, I dunno what I&#039;d do w/o this board sometimes.

  2. #2
    Join Date
    Dec 1969

    Default RE: Help w/ FileSystemObject

    check out<BR><BR>there&#039;s an article there about loops within loops - the infinitemonekys homepage - it should touch on this subject, as it&#039;s pretty much how the site works<BR><BR>j

  3. #3
    H.R. PuffNStuff Guest

    Default RE: Any Other Takers??


  4. #4
    Join Date
    Dec 1969

    Default There's gotta be a better way...

    Why not just use a database table mapping physical file names to a title/description? Granted, if you remove/rename/add a file you&#039;ll have to do so DB maintenance, but you could automate all this jazz with a WSC script. Hrmm... Or, like you suggest, you could make up some fake filename extension, like .dsr. Then, for each file that needs a custom filename, you&#039;d create another file with a .dsr extension. So, if you had foo.htm you could create:<BR><BR>foo.htm.dsr<BR><BR>that contained two lines, the first line the title the second line the description. Then, when you are looping through the files to display them, skip over .dsr files. If you find a non-.dsr file, check to see if a filename.dsr file exists - if so, display the custom title/description.<BR><BR>Make sense?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts