Dim folder As New DirectoryInfo("folder path here")
Dim files = folder.GetFiles()

File.WriteAllLines("output file path here", files.Select(Function(fi) fi.Name))