windows 7 - Use batch file to launch ssdeep with file arguments -


i attempting use looping batch file launch cmd app ssdeep , pass file argument it, keep ssdeep window open copy chunk of output clipboard have following code:

@echo off :start set /p filetohash= file fuzzy hash?  start c:\users\josh\desktop\ssdeep-2.10\ssdeep-2.10\ssdeep.exe %filetohash% pause goto start 

this allows me run batch file, can drag , drop file hash cmd window. upon hitting return, ssdeep cmd window appears moment takes hash file, closes. leaves me 1st window generated batch file, requesting key press.

i want have 2nd cmd window stay open can copy hash out. similar pause used in batch file, need apply 2nd cmd window created.

i'm not sure how search information. have searched info on batch files. used these resources far:

https://superuser.com/questions/582095/how-to-create-a-batch-file-that-will-run-cmd-and-a-exe-with-parameters

and

batch files : how leave console window open

thanks in advance,

ptw-105

use /b switch start command - see if need (leave pause in).

start "" /b c:\users\josh\desktop\ssdeep-2.10\ssdeep-2.10\ssdeep.exe %filetohash% 

the empty double quotes protect start command if ever add quoted items in commands.

try command create hash.txt on desktop - remove pause - should contain information if gets printed stdout. can parsed extract hash: if add information question should in format can read , see how parse it.

start "" /b c:\users\josh\desktop\ssdeep-2.10\ssdeep-2.10\ssdeep.exe %filetohash% >"%userprofile%\desktop\hash.txt" 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -