Results 1 to 3 of 3

Thread: Getting file names from a directory

  1. #1
    Join Date
    Jan 2006

    Getting file names from a directory

    Hello all,

    Is it possible to get the names of a list of files (contained on the server). I have a directory called images and I wish to create a slideshow of all the images in that directory. At the moment I am loading the images from a static array.

    How do I go about getting all the image names in a folder and storing them in a dynaic array?

  2. #2
    Join Date
    May 2003
    Between Baltimore and DC
    You would need a server side code to do this.

    Highly doubt you use .NET but I wrote an example here: http://radio.javaranch.com/pascarell...780941510.html

    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  3. #3
    Join Date
    Jan 2006


    Hello A1ien51,
    I am in fact using asp.net and vb.net.
    My understanding of your blog is that you get the contents of a directory using vb.net and you store the results into a xml file.

    What i could do is get the contents of the directory when I load the page and store all the image names in an arraylist. Is there anyway to access the contents of a VB variable from javascript?

    If not I will append the results to a string and store the string in a hidden textbox. Put in the filenames seperated by *'s and then build my dynamic array in javascript.

    I am new to Javascript so how would I go about parsing a string, searching for a particular character and dividing the string?

    Any suggestion are welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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