My python script requires two inputs from the command line like this:
project.py input1.txt input2.txt
I'm trying to make a batch file that will just prompt for the name of the inputs and then run my script. Here's what I have so far:
@echo off
set /p inputName="Enter File Name: " %=%
set /p scoring="Enter Scoring Matrix Name: " %=%
type %inputName% %scoring% | project2.py
PAUSE
What is the purpose of the trailing %=%
on your set
lines? Baffling to me ;-)
What you want at the end is simple:
project.py %inputName% %scoring%
It doesn't make sense to use type
- that command is to print the contents of a file, and the expansion of %inputName% %scoring%
is not a file path.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.