Why doesn't this batch file work for me?
The following batch file is not woking.
Can anyone help me with this?.@echo off
python -c "print('echo text')" > %TEMP%\test.bat
call %TEMP%\test.bat
test.bat
creation did not work.If the "python" you are calling is a batch file (python.bat in the path perhaps?) then the launching batch file will abort after calling it, unless you use the Call command like you are doing for temp.bat.
So perhaps
will give you better mileage?@echo off
call python -c "print('echo text')" > %TEMP%\test.bat
call %TEMP%\test.bat
精彩评论