Skip to content

Instantly share code, notes, and snippets.

@mebiusbox
Created March 25, 2017 03:10
Show Gist options
  • Save mebiusbox/eddd8d18208e61a61d47234a6fd84629 to your computer and use it in GitHub Desktop.
Save mebiusbox/eddd8d18208e61a61d47234a6fd84629 to your computer and use it in GitHub Desktop.
Save the dropped files as hash name batch
: Fciv is required. Please download from below and expand to any place, and add the path to fciv.
: https://support.microsoft.com/ja-jp/help/841290/availability-and-description-of-the-file-checksum-integrity-verifier-utility
@echo off
setlocal enabledelayedexpansion
rem set PATH=%PATH%;{fciv path}
for %%f in (%*) do (
set NAME=
for /f "usebackq tokens=1" %%a in (`fciv %%f`) do set NAME=%%a
copy %%f "%~dp0!NAME!%%~xf"
)
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment