Open Altaaf16 opened 5 months ago
To open a notepad using bat file.
@echo off start notepad.exe
To run a python file via bat file
@echo off python myscript.py pause
• @echo off: This command turns off command echoing in the batch file, which prevents commands from being displayed as they are executed.
• python myscript.py: This command runs the Python script named myscript.py. Make sure Python is installed on your system and accessible via the PATH environment variable.
• pause: This command keeps the command prompt window open after the script has finished executing, allowing you to see any output or error messages.
Display hello world
This is a cool Windows script.
echo "Hello, World!"