Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Script variable not not executing

$
0
0
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.

Code:

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) & objSource & Chr(32) & objswitches & Chr(32) & objlog

Wscript.echo objCommand

objShell.Run(objCommand) 

MsgBox "Hash Directory Files Has been executed"


Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>