Subject: Is there a Dir() Function with JavaScript
Posted By: rguidry Post Date: 9/27/2005 11:36:41 AM
I need to return all of the file names from a particular folder on the local ISS Server Hard drive using Java Script.  
Example:
folder Location is C:\FTP_Downloads\MIN\
There are 50 pdfs in this folder
I need the name of each of the 50 pdfs in the folder

Reply By: joefawcett Reply Date: 9/28/2005 10:11:40 AM
JavaScript has no functions that interact with the "outside world", it can only do these things via COM or other external objects such as a browser.

If you want to read files using server-side script then you can use the FileSystemObject on an IIS server.

If you want to read files on a server using client-side script then it's unlikely to work. You'd need to have a very low security setting on the browser and the files would need to be on a share. Another possibility is to allow WebDAV requests on the server combined with the XmlHttpRequest.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcewebsr/html/ceconWebDAV.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlweb/html/xmlandwebdav.asp


--

Joe (Microsoft MVP - XML)
Reply By: rguidry Reply Date: 10/3/2005 11:54:30 AM
Looks like that is the answer.  Thank  you for your help.  I will let the group know if it works for me.


Go to topic 35078

Return to index page 461
Return to index page 460
Return to index page 459
Return to index page 458
Return to index page 457
Return to index page 456
Return to index page 455
Return to index page 454
Return to index page 453
Return to index page 452