Someone on this board directed me to another site that contained information regarding the FileSystemObject Objects.
After experimenting with the Objects, I'm able to successfully list all files from a directory that I specify
using the Files collection or I can display the name of
one file using the File object.
What I'm wanting to do is display all the files that have
an extension of .xls for instance. I don't think the Files collection will let me restrict what files to bring back, yet the file object seem to only want to return one file.
Anyone have any insight into this?
Thanks.
After experimenting with the Objects, I'm able to successfully list all files from a directory that I specify
using the Files collection or I can display the name of
one file using the File object.
What I'm wanting to do is display all the files that have
an extension of .xls for instance. I don't think the Files collection will let me restrict what files to bring back, yet the file object seem to only want to return one file.
Anyone have any insight into this?
Thanks.
Code:
var fso, fldr, fl;
fso = new ActiveXObject "Scripting.FileSystemObject");
fldr = fso.GetFolder("c:\\folder\\subfolder");
Response.Write(fldr.Name);
fl = fso.GetFile("c:\\folder\\subfolder\\BCEU.xls"); 'there is actually multiple .xls files to return, but can only seem to specify one file.
Response.Write(fl.Name);