0

I have a folder full of xml files all in the same format but with different and ever changing file names

I am wondering if there is a way where I can get Visual Basic to just go through all files available so as I can extract the data from all?

1
  • You sure can: Foreach file in folder { do something }. If you want a more detailed answer you need to post some more details yourself, for example what have you tried so far? Commented Mar 13, 2013 at 16:08

1 Answer 1

1
    Dim di As System.IO.DirectoryInfo = New System.IO.DirectoryInfo("C:\Some Directory")
    Dim xmlFiles As System.IO.FileInfo() = di.GetFiles("*.xml")
    For Each xmlFile As System.IO.FileInfo In xmlFiles
        ' do some data processing here
    Next
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.