Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts

    reading contents of folder, then using each file in JS

    hey. i usually post in the JS & html/CSS forums... but i felt i needed a change

    I'm trying to do something which, in my mind, should be relatively simple. i'm basically lazying out and want to do as follows. I just had a baby boy and have buttloads of pictures on my computer. i want to make a slideshow for various people who are hounding me to see pictures. that being said, i dont want to rename 100+ pictures and add them to an array for the JS slideshow.

    so here's what i want to do. using a variation on this script i found below, i wish to read all the file names (in whatever order the appear in the folder (or dir, whatever). what i need help with is altering the code so that it reads the first file name, and sets variable A to that filename.

    i want to pass variable A to the JS script son on so that i can have a slideshow without having to rename each file

    Code:
    <%
    dim fs,fo,x
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set fo=fs.GetFolder("c:\test\")for each x in fo.files
      'Print the name of all files in the test folder
      Response.write(x.Name & "<br />")
    nextset fo=nothing
    set fs=nothing
    %>
    this script needs modifying, and my ASP knowledge consists of being able to spell ASP :P

    any help would be appreciated
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    looks PERFECT!.

    but i have to get on a computer with the ability to test it

    and do so.

    but i'll let you know. Thanks Roy.
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

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