Skip to content

Instantly share code, notes, and snippets.

@atifaziz
Created December 19, 2012 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atifaziz/4336556 to your computer and use it in GitHub Desktop.
Save atifaziz/4336556 to your computer and use it in GitHub Desktop.
Windows batch script to create T-SQL varbinary literal from the bytes of a given file
@PowerShell -Command "'0x' + [System.BitConverter]::ToString([System.IO.File]::ReadAllBytes('%~f1')).Replace('-', '')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment