How to get list of all filenames in a directory using VB6

directoryfilevb6

What is the simplest way in VB6 to loop through all the files in a specified folder directory and get their names?

Best Solution

sFilename = Dir(sFoldername)

Do While sFilename > ""

  debug.print sFilename 
  sFilename = Dir()

Loop