List down file in directory VB6

List down file inside folder using VB6:

Here is a piece of code which is do this:

This code will get list of file in folder and separate file name and extension and put in array.

 

Private Sub GetFilesName (sFileDir  As String)

Dim sFilename As String
Dim aFName() As String

sFilename = Dir(sFileDir)

Do While sFilename > “”
aFName = Split(sFilename, “.”)
sFilename = Dir()
Loop

Exit Sub

End Sub

One comment

Leave a Reply