StefanoUd70
2 discussion posts
I need to create a function that lists the names of all the files (perhaps using wildcards) contained in one folder.
Is it possible? Any suggest please?
In Visual Basic if possible
Thank you
StefanoUd70
2 discussion posts
I succeeded in solving my question: this is the code, perhaps it could be useful to somebody:
Imports System
Imports System.Drawing
Imports System.IO
' The 'windowHandle' parameter will contain the window handle for the:
' - Active window when run by hotkey
' - Trigger target when run by a Trigger rule
' - TitleBar Button owner when run by a TitleBar Button
' - Jump List owner when run from a Taskbar Jump List
' - Currently focused window if none of these match
Public Class DisplayFusionFunction
Public Shared Sub Run(ByVal windowHandle As IntPtr)
Dim myFilesArray() as String
Dim myFileName as String
Dim B as Boolean
B = False
While not B
myFilesArray = directory.getfiles("put the folder path here")
For Each myFileName in myFilesArray
BFS.Dialog.ShowMessageInfo(myFileName)
Next
B = BFS.Dialog.GetUserConfirm("Stop the application?")
End While
End Sub
End Class