Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
441 B
0
Indexable
Never
@echo off
setlocal enabledelayedexpansion

set "inputFile=%~1"

if not exist "%inputFile%" (
    echo Input file not found.
    pause
    exit /b
)

set "outputFile=%~dpn1.txt"

certutil -encodehex -f "%inputFile%" "%outputFile%" 0x40000001 >nul 2>&1

if exist "%outputFile%" (
    echo File successfully converted to base64 and saved as "%outputFile%".
) else (
    echo Failed to convert the file to base64.
)

pause