<# : batch script Don't Delete This Line. Ne supprimez pas cette ligne.
@rem # La ligne précédente ne fait rien dans Batch, mais commence un bloc de commentaire multiligne dans PowerShell. Cela permet à un seul script d'être exécuté par les deux interpréteurs.
@rem # The previous line does nothing in Batch, but begins a multiline comment block in PowerShell. This allows a single script to be executed by both interpreters.
@echo off
Title Get ClipBoard And Replace Special Characters for ASCII ART to copy into a batch file
setlocal
cd "%~dp0"
Color 0B & echo(
echo @echo off ^& Title Copying ART ASCII From ClipBoard to a batch file ^& Color 0A>Code_ART_ASCII.bat
Echo( Please Wait a while ... Executing the Powershell command ...
Powershell -executionpolicy remotesigned -Command "Invoke-Expression $([System.IO.File]::ReadAllText('%~f0'))"
echo pause>>Code_ART_ASCII.bat
EndLocal
goto:eof
#>
# here write your powershell commands...
(Get-Clipboard) -replace '([\^&<>\|\(\)!])', '^$1' -replace "%", "%%" -replace '^', "echo/ " | Out-File Code_ART_ASCII.bat -Append -Encoding ASCII