Last active
April 9, 2021 13:12
-
-
Save luiswolff/d8b99f31be378df66ca45d1376bc1ecd to your computer and use it in GitHub Desktop.
A CMD-File, thats convert a given File to a Base64-Code and write that to an other file. The File that should be encoded is submitted as command line parameter. So you can use the drap and drop function of Windows. The output file will be the same as the input but with the string ".base64" as suffix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powershell -command "$bytes = [System.IO.File]::ReadAllBytes('%1'); [Convert]::ToBase64String($bytes) | Out-File -FilePath '%1.base64' -Encoding ASCII -NoNewline" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment