Drag and drop batch file help for automated blake2 checkum

Discussion in 'Scripting' started by edmiri, Feb 24, 2019.

  1. edmiri

    edmiri MDL Novice

    Oct 27, 2016
    45
    6
    0
    I want to use https://blake2.net BLAKE2sp with official fat binary from b2sum utility https://blake2.net/b2sum-bin_20130305.zip

    I can create BLAKE2sp if i run cmd and manually put commands and file location but this gets to much time for a simple hash check

    the cmd for manual hash is: C:\Users\Admin\Desktop\b2sum-bin_20130305\b2sum-amd64-windows.exe -a blake2sp "C:\Users\Admin\Desktop\b2sum-bin_20130305\filename.exe"



    What i want to do is to create a batch file and drag & drop on it the file i want to check the BLAKE2sp hash.

    How can i change the Start "Drag and Drop" "%windir%\system32\Notepad.exe" "%~1" so it opens with b2sum-amd64-windows.exe no matter where it is located?

    Batch file and b2sum-amd64-windows.exe will always be in the same folder.

    @echo off

    Title Drag and drop a file to open with Notepad

    Mode con cols=60 lines=3

    IF [%1] EQU [] Goto:Error

    CD /D "%~1">nul 2>&1 && Goto:Explorer_Folder || Goto :OpenFile

    Exit /b

    ::**********************************************************

    :OpenFile <File>

    Start "Drag and Drop" "%windir%\system32\Notepad.exe" "%~1"

    Exit /b

    ::**********************************************************

    :Explorer_Folder <Folder>

    Explorer "%~1"

    Exit /b

    ::**********************************************************

    :Error

    Color 0C & echo(

    ECHO You must drag and drop a file on this batch program

    Timeout /T 5 /NoBreak >nul

    Exit /b

    ::**********************************************************
     

    Attached Files: