我为python设置环境变量,如果我不在批处理文件中输入用户输入,我可以运行python。但是如果我接受用户输入,我就无法在批处理文件中运行python脚本。
@echo off
set /p Path="Enter Folder path in which all the timestamp files are stored: "
echo %path%
:: this is to read ip address from report folder to ipaddress.txt
dir %Path% /b /a-d > ipaddress.txt
echo %cd%
python trial.py
选择path
以外的变量名。
path
是一个保留名称,包含搜索可执行文件的目录列表 - 如python.exe