Hi
The goal of this code is to drag and drop a file onto the script and it encodes or decodes it in Base64 with Certutil Command.
So my question is : "What can i do to escape special characters when a file to be encoded or decoded have them ?"
Thank you !
@echo off
Set "file=%~1"
If "%file%"=="" GOTO:EOF
>nul find "-----BEGIN CERTIFICATE-----" "%file%" && (
certutil -f -v -decode "%file%" "%file%"
) || (
certutil -f -v -encode "%file%" "%file%"
)
@EXIT