Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error on bat file
#10
(Aug-28-2018, 05:42 AM)Sanlus Wrote: now i have syntax error on off in @echo off. rip
You 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')
Reply


Messages In This Thread
error on bat file - by Sanlus - Aug-27-2018, 11:09 AM
RE: error on bat file - by Larz60+ - Aug-27-2018, 11:21 AM
RE: error on bat file - by Sanlus - Aug-27-2018, 11:37 AM
RE: error on bat file - by Larz60+ - Aug-27-2018, 11:45 AM
RE: error on bat file - by Sanlus - Aug-27-2018, 12:09 PM
RE: error on bat file - by Larz60+ - Aug-27-2018, 12:13 PM
RE: error on bat file - by Sanlus - Aug-27-2018, 12:46 PM
RE: error on bat file - by snippsat - Aug-27-2018, 02:47 PM
RE: error on bat file - by Sanlus - Aug-28-2018, 05:42 AM
RE: error on bat file - by snippsat - Aug-28-2018, 02:10 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020