1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| @echo off
Title Generate ASCII ART with drag and drop a text file
SetLocal EnabledelayedExpansion
If ["%~1"] EQU [""] Goto :Help
color 0A
echo @echo off ^& color 0A ^& Title ASCII ART>"%~n1_Ascii_Art_Gen.bat"
for /f "tokens=* delims=" %%a in ('Type "%~1"') do (
set "Line=%%~a"
set Line=!Line:^^=^^^^!
set Line=!Line:^&=^^^&!
set Line=!Line:^<=^^^<!
set Line=!Line:^>=^^^>!
set Line=!Line:^|=^^^|!
set Line=!Line:^(=^^^(!
set Line=!Line:^)=^^^)!
set Line=!Line:%%=%%%%!
echo echo. !Line! >> "%~n1_Ascii_Art_Gen.bat"
)
echo pause>>"%~n1_Ascii_Art_Gen.bat"
Start "" "%~n1_Ascii_Art_Gen.bat"
EXIt /b
::---------------------
:Help
Color 0C
echo( & echo( You should Drag and Drop a txt file over this batch script "%~nx0"
TimeOut /T 5 /NoBreak>nul
Exit /B
::--------------------- |