Scripting miscellaneous filenames

Results 1 to 2 of 2

Thread: Scripting miscellaneous filenames

  1. #1
    Join Date
    Dec 1969

    Default Scripting miscellaneous filenames

    I am trying to write a code to pull out all the filenames for a specific file extention, as follows:<BR><BR>Response.Write szIndent2 & " &#060;a href="" *.jpg""&#062; Topic&#039;s image&#060;/a&#062;&#060;br<BR><BR>Is this the correct format (as in a DOS command)or do I need:<BR>filename = ofso.GetFileName("\SknetCFDglibac\")<BR><BR>Thanks JanPaul

  2. #2
    Join Date
    Dec 1969

    Default It's worse than either of those

    You have to open up a folder (using FSO) and then look through all the files, in a loop, choosing only the ones you want (by doing string pattern matching). Then you can generate on &#060;A HREF&#062; for *each* of the names that you decide match your pattern.<BR><BR>There are *NO* wild card capabilities, at all. There is no automatic way to get all files in a directory, other than a loop in code, at all.<BR><BR>Start by looking at the ASPFAQs (link is at top right corner of this very page) in the category "File System Object".<BR><BR>

Posting Permissions

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