Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop all files..? 1

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I'm trying to loop all XML-files in a directory so that I can load the files, one by one, into a database.
Below is what I have in a ActiveX DTS package on SQL-server.
But I can't get it to work.
================================
......
Set fso = CreateObject("Scripting.FileSystemObject")
Set fold= fso.getFolder("c:\test\")

For Each file in fold.Files
objXMLDOM.load file
.......
Next
================================

I'll get an error on:
"Error description: Invalid procedure call or argument: 'objXMLDOM.load'"
So I guess there something wrong with 'file' in objXMLDOM.load file

How can I get it right?

/Kent J.
 
You may try this:
objXMLDOM.load file.Path

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top