read and right a text file through batch in python
- batch file named run.choice.bat
- text file named choice.txt
- text file named python.txt
- and a python file named choice.py
The batch file contains this code:
set /p c=<"choice.txt"
echo %errorlevel% > python.txt
The python file contains this code:
o = open("choice.txt", "wb")
i = open("python.txt", "r+")
my problem is that the batch file wont read choice.txt while running in python, on its own it runs fine.
can somebody help me fix it?