Altaaf16 / Code

0 stars 0 forks source link

Script #2

Open Altaaf16 opened 5 months ago

Altaaf16 commented 5 months ago

Display hello world

This is a cool Windows script.

echo "Hello, World!"

Altaaf16 commented 5 months ago

To open a notepad using bat file.

@echo off start notepad.exe

Altaaf16 commented 5 months ago

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.