I have a script which I can run perfectly if I call it manually in the command prompt.
cd \
cd impressio
cd input
for %%f in (.txt)do (
echo "%%~nf"
"C:\Program Files\Splunk\bin\splunk cmd python" "D:impressio\deployment code\add_null.py" "%%~nf.txt" "%%~nf_processed.txt"
)
When I save this script as <filename>.bat and double-click, it always prompts me an error message: “Program Files is not recognized as an internal or external command”.
Is it because of the environment variable setting issue? Did anyone come across such thing before, or does my code have a problem?
Not sure why
Program Filesis mentioned in the error message, but there does seem to be an issue with the line where you are calling your Python script.In particular, this bit:
should likely be this instead: