Basic Batch File


The command prompt (cmd) on Windows systems provides an easy and yet ‘technical’ way of managing your system. 
Knowing one or two of these commands could save you a lot of time sometimes. So today I’ll be sharing a few of these commands just for a start.

SHUTDOWN/RESTART

Traditionally, we all like to click here and there to get things done. What if we could be more geeky once in a while? This command simply shuts down or restart your system. You can even assign a time for which the process should take place. Ok enough talking. Let’s get down to business.

First, open your command prompt by simply typing in ‘cmd’ (without quotes) at the start screen. Your cmd window should be visible now. Type the following in the window:

shutdown -s -t 60

Obviously, shutdown means shutdown. 
-s means shutdown as well (kinda weird) 
-t is specifying the time (in seconds). So the 60 that follows is sixty seconds, i.e one minute.

We could also replace -s with -p or -r, where they mean power-off and restart respectively.

Alternatively, you can simply open notepad and type in any of the commands, then save them with a (.bat)  extension. For example, you’ll save the first command as shutdown.bat

So when you run the file, it simply does the same thing as typing it in the cmd window.

So that’s it. Try it out and let’s here about it in the comments.

More to come later.

Advertisements

Got a Question? Comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s