FileSystemObject Programming

Results 1 to 2 of 2

Thread: FileSystemObject Programming

  1. #1
    Kent Ogletree Guest

    Default FileSystemObject Programming

    I have a short script that retrives the contents in the directory using the FileSystemObject. I can list all the files using a FOR EACH loop.<BR><BR>For Each File in folder.Files<BR> Response.Write (File.Name & "&LT;br&GT")<BR>Next<BR><BR> However I would like to extract a single filename at random. Every method I have tried to access the array results in an error. As I can not seem to find any documentation to the returned array, I am a bit at a loss. Any idea how to reference a single file name without using the FOR EACH method?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Check the "fileexists" method

    if you know the file name then you can call <BR>if folder.fileexists "yourfilename" then<BR>..<BR>else<BR>..<BR>end if

Posting Permissions

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