So I want to create a custom command in command prompt. For example:
C:\Users\User> create Helloworld
Where create will be the custom command which will run a batch script to run a python file and pass the string Helloworld to the python file.
I'm new to batch files. Any help is appreciated. Have a great and safe day! Thanks for reading!
1 Answer 1
@echo off
Call x:\path\yourPyBtachCaller.cmd "%*"
And place this create.cmd in any of the folders in your %PATH%
Sign up to request clarification or add additional context in comments.
Comments
lang-py
call /?and read the output help. So if you create, for example, in directory%SystemRoot%(C:\Windowsin most cases) a batch filecreate.batorcreate.cmdwith, for example,@python.exe "C:\Full Path\ScriptFile.py" %*, then you have what you want.pleasewill see if I can do something for you like that.