Cesar Salcido
2014-04-29 17:05:26 UTC
Here is my script i have i put together to work with MD5Deep. it runs, however it wont create the log. i would a appreciate a nudge in the right direction to try and figure out where i failed.
when i use the following command it works with full paths it works: md5deep64 -r -t -c Directorytohash > logpath\logname.txt
but when i use the following script it does not log the job run.
Set objShell = CreateObject("Wscript.Shell")
objSource = InputBox("Enter Directory to Hash:" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Example: C:\Source\Data", _
"Source Folder")
If objSource = "" Then
Wscript.Quit
Else
Wscript.Echo objSource
End If
objlogpath = InputBox("Please enter the Path and name of the existing log folder: Example: C:\LogFolder\logname.txt" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "LOG FILE MUST HAVE A .TXT OR .CSV EXTENSION", _
"Log Path and Folder Folder")
If objlogpath = "" Then
Wscript.Quit
Else
Wscript.Echo objlogpath
End If
objcmd = "md5deep64.exe"
objSource = """" & objSource & """"
objswitches = " -r -t -c "
objlog = ">" & objlogpath
objCommand = objcmd & Chr(32) & objswitches & Chr(32) & objSource & Chr(32) & objlog
Wscript.echo objCommand
objShell.Run(objCommand)
MsgBox "Hash Directory Files Has been executed"
when i use the following command it works with full paths it works: md5deep64 -r -t -c Directorytohash > logpath\logname.txt
but when i use the following script it does not log the job run.
Set objShell = CreateObject("Wscript.Shell")
objSource = InputBox("Enter Directory to Hash:" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Example: C:\Source\Data", _
"Source Folder")
If objSource = "" Then
Wscript.Quit
Else
Wscript.Echo objSource
End If
objlogpath = InputBox("Please enter the Path and name of the existing log folder: Example: C:\LogFolder\logname.txt" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "LOG FILE MUST HAVE A .TXT OR .CSV EXTENSION", _
"Log Path and Folder Folder")
If objlogpath = "" Then
Wscript.Quit
Else
Wscript.Echo objlogpath
End If
objcmd = "md5deep64.exe"
objSource = """" & objSource & """"
objswitches = " -r -t -c "
objlog = ">" & objlogpath
objCommand = objcmd & Chr(32) & objswitches & Chr(32) & objSource & Chr(32) & objlog
Wscript.echo objCommand
objShell.Run(objCommand)
MsgBox "Hash Directory Files Has been executed"