It is currently Wed May 27, 2020 4:43 am


Shut down a computer using Notepad

Buying or building computers for Hauptwerk, recommendations, troubleshooting computer hardware issues.
  • Author
  • Message
Offline
User avatar

engrssc

Member

  • Posts: 6412
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

Shut down a computer using Notepad

PostThu Sep 13, 2018 3:50 pm

https://www.wikihow.com/Shut-Down-a-Computer-Using-Notepad

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.

Rgds,
Ed
Offline
User avatar

IainStinson

Member

  • Posts: 965
  • Joined: Tue Dec 29, 2009 7:08 pm
  • Location: NW England, UK

Re: Shut down a computer using Notepad

PostThu Sep 13, 2018 6:09 pm

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.


Iain
Last edited by IainStinson on Thu Sep 13, 2018 7:46 pm, edited 1 time in total.
Offline
User avatar

engrssc

Member

  • Posts: 6412
  • Joined: Mon Aug 22, 2005 11:12 pm
  • Location: Roscoe, IL, USA

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

PostThu Sep 13, 2018 6:15 pm

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)

Rgds,
Ed

Return to Computer hardware / specs

Who is online

Users browsing this forum: No registered users and 2 guests