(Aug-28-2018, 05:42 AM)Sanlus Wrote: now i have syntax error on off in @echo off. ripYou are making a
.bat
file and not run it with Python?Batch file : ECHO command
A run i cmd.
E:\>cd E:\div_code\bat # look at files E:\div_code\bat>dir Volume in drive E is 2 TB Volume Serial Number is 3433-29C0 Directory of E:\div_code\bat 28.08.2018 15:57 <DIR> . 28.08.2018 15:57 <DIR> .. 27.08.2018 16:28 45 hello.bat 27.08.2018 16:27 46 hello_27.bat 2 File(s) 91 bytes 2 Dir(s) 222 956 498 944 bytes free # Content of hello.bat E:\div_code\bat>more hello.bat @echo off python C:/foo/hello.py %* pause # Run hello.bat E:\div_code\bat>hello.bat hello world Press any key to continue . . . # Content of hello_27.bat E:\div_code\bat>more hello_27.bat @echo off py -2.7 C:/foo/hello.py %* pause # Run hello_27.bat E:\div_code\bat>hello_27.bat hello world Press any key to continue . . .
hello.py
that .bat
files run:print('hello world') #input('Press enter to exit')