Page 1 of 1

Shut down a computer using Notepad

PostPosted: Thu Sep 13, 2018 3:50 pm
by engrssc

I'm planning a project that will use a second (in addition to the main H/W) computer.

What else can Notepad do?

Alternative for Mac - TextEdit is the best and comes bundled with OSX.


Re: Shut down a computer using Notepad

PostPosted: Thu Sep 13, 2018 6:09 pm
by IainStinson
Notepad is a plain text editor which comes with WIndows.

Notepad can't / doesn't shutdown the computer. In the exampled linked in the post above, Notepad is used to create .bat file (batch file) which includes the windows "shutdown" command; when the .bat file is executed (or opened by the double click) the command in the batch file is executed and the computer shutdown. The .bat file shuts the system down not Notepad.

Windows .bat (batch) files are just files which contain a list of commands which are executed one after another when the .bat file is executed. (MacOS script files are equivalent.) Windows .bat files (and MacOS scripts) can include some simple programming features which can make the .bat file do more complex tasks. .bat files are widely used to simplify carrying out frequently performed tasks (which need a sequence of native/basic commands to be executed).

If you were using two computers for HW, then if you had a network connection between them, then one of the computers could send commands to the other machine to make it (for example) shutdown. This would probably require some programming which be possible in a .bat or a MacOS script.


Re: Shut down a computer using Notepad commands and .bat

PostPosted: Thu Sep 13, 2018 6:15 pm
by engrssc
Yes, I understand that and have it working as you describe. Google has other examples of what can be done as well. Still kinda neat. 8)