📜 ⬆️ ⬇️

Php code inside your bat files

Quite often I write small scripts for PCP for myself, but every time I’m tired of launching them from the command line, but I don’t want to associate to a double-click launch because I’ve got used to the fact that in this case the file opens in the editor. You can write batch file, with a single line inside, to run, but in this case, for each simple script there will already be two files, so I decided to cross these files.

What happened
Create a file, name it for example p.bat and write the following code to it.

rem <?/*
" " p.bat
exit
rem */ echo "\r \r";

//

You probably need to explain only line 4, the echo call is needed to wipe the rem word in the output

')

Source: https://habr.com/ru/post/92019/


All Articles