Dim RetVal As Long
Dim WSH
Dim WaitForTermination As Boolean
Dim CommandLine As String
Private Declare Sub ExitProcess Lib "kernel32" (ByVal ReturnCode As Long)
Private Sub Command1_Click()
Dim oFso As New FileSystemObject
Dim oFolder As Folder
Dim ofile As File
Dim str_srcfoldername As String
Dim str_dstfoldername As String
Dim int_totalcount As Integer
Dim int_converted As Integer
Dim int_pgbarunit As Integer
Set WshShell = CreateObject("WScript.Shell"
Open "c:\testing.txt" For Output As #1
str_srcfoldername = c:\inputSet oFolder = oFso.GetFolder(str_srcfoldername)
MsgBox (str_srcfoldername)
For Each ofile In oFolder.Files
Print #1, ofile.Name
WaitForTermination = True
filepath = str_srcfoldername & ofile.Name
CommandLine = "c:\md5.exe " & filepath
RetVal = WSH.Run(CommandLine, vbNormalFocus, WaitForTermination)
MsgBox "Process returned: " & RetVal
Next ofile
Set WSH = Nothing
Close #1
End Sub