Skip to content

Instantly share code, notes, and snippets.

@kasajian
Created May 20, 2014 02:59
Show Gist options
  • Save kasajian/6479e25d32310db9353b to your computer and use it in GitHub Desktop.
Save kasajian/6479e25d32310db9353b to your computer and use it in GitHub Desktop.
Determine if an exe or bat can be invoked
rem To determine if 7za.exe is in the path:
for %%X in (7za.exe) do (set FOUND=%%~$PATH:X)
rem To determine if 7z.exe is at the specified location:
if exist "%programfiles(x86)%\7-zip\7z.exe" set FOUND=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment