jfill89
asked on
Loop over a directory full of documents
I have the following code:
Set objBL = CreateObject("SQLXMLBulkLo ad.SQLXMLB ulkLoad")
objBL.ConnectionString = "Provider=SQLOLEDB;Driver= {SQL Server};Server=(local);Dat abase=fsbo sys;Truste d_Connecti on=yes;"
objBL.ErrorLogFile = "c:\error.xml"
objBL.Execute "c:\schoolmapping.xml", "E:\inetpub\wwwroot\xmls\l ocal-great schools-fe ed-AK.xml"
Set objBL = Nothing
This works great for one document like this "local-greatschools-feed-A K.xml". But the "E:\inetpub\wwwroot\xmls\" directory has about 100 documents in it and I do not want to have to manually change the code for each document.
How can I read the contents of "E:\inetpub\wwwroot\xmls\" then loop over this code inserting "local-greatschools-feed-A K.xml" for the name of the file?
Thanks
jfill
Set objBL = CreateObject("SQLXMLBulkLo
objBL.ConnectionString = "Provider=SQLOLEDB;Driver=
objBL.ErrorLogFile = "c:\error.xml"
objBL.Execute "c:\schoolmapping.xml", "E:\inetpub\wwwroot\xmls\l
Set objBL = Nothing
This works great for one document like this "local-greatschools-feed-A
How can I read the contents of "E:\inetpub\wwwroot\xmls\"
Thanks
jfill
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi, Even for 50 points (:-}) I'm interested in it's disposition.
.. Alan
.. Alan
I think both provided answers are valid solutions. So up to you what to do with the points.
Nathan
Nathan
You could do this with a file control.
I will post code for this in a sec.
Nathan