DannyD
DannyD

Reputation: 2881

How do I create a batch file that will allow my python script to take 2 inputs

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

Upvotes: 0

Views: 79

Answers (1)

Tim Peters
Tim Peters

Reputation: 70685

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.

Upvotes: 1

Related Questions