Tuesday, November 22, 2016

What is a batch file ?

Batch file can contain a series of commands which can work on DOS, OS2 and Windows. The batch file can be edited in any notepad application. In short we can say batch file is a script file which contains series of commands, which can be executed by the cmd.exe or command line interpreter.

The batch file name extension can be .bat in DOS and Windows, .btm in specific shell command interpreters and also .cmd.

You can use the below steps to create a sample batch file.

1. If you are using Microsoft windows, open notepad application

2. Copy the below code in the notepad file:

@echo off
SET /p name="Enter your name: "
echo .
echo .
echo Your Name is %name%
Pause

3. Save this text file. After saving close the text file and rename the file extension from .txt to .bat

4. In my case i have saved it as check.bat






5. Double click on this file and it will open a dos window.















We just created a batch file, which asks us for the input and replies with the output. In similar way we can add series of questions and create a interactive batch file.

How the above code works ?

@echo off
This turns off the text which is not required to view, when running a command. e.g. the selected drive path. You can try changing the @echo off to @echo on to see the results.

SET /p name="Enter your name: "
Here we are asking the user to input his/her name. the Set /p command assigns the value of the input to a variable name.

echo .
echo .
Added above code just to create 2 lines, before the output line.

echo Your Name is %name%
Here we are showing the variable name value in the final output line. In order to read the variable by the code interpreter, we need to add % at start and end of the variable. In this case %name%

Pause
We added the Pause code, to pause the window from exiting or executing any other command. If we remove this, the DOS window will exit once we press enter after input line.

Thank you for reading.

Also see:
How to restart google chrome fast and improve system performance ?
WhatsApp launched Video Calling Feature
What is the best free software for video conversion ?
How to convert files into PDF ?
What are the few free must have apps in your system ?

Monday, November 21, 2016

How to restart google chrome fast and improve system performance ?

Most of the users use the Google Chrome as their default browser. While it is observed that, after opening multiple tabs in chrome browser, your chrome and the system slows down.

This is caused due to multiple ad-dons running in chrome and multiple pages open, eating up the system RAM (read only memory).

To make the system and chrome faster, the only solution comes to mind is uninstall the ad-dons or restart the chrome browser. which will free up the RAM space.

The way to restart chrome is to close the google chrome browser and open it from the desktop shortcut. Apart from this method, chrome has provided a special feature in the browser, to restart the chrome using the web url.

The url is to restart chrome is chrome://restart . Copy paste this url to your browsers address bard and hit enter, this will close the google chrome browser and re-open the same. The restart of the browser results in freeing up RAM space and making the system and browser faster.

This url can be added to the bookmarks and run whenever you feel the chrome or your system is slowing down.

To add this url to the chrome bookmark, please follow the below steps:
1. Open new tab in chrome browser
2.  Press Ctrl + D. This will open the below pop up window.












3. Click on Edit button. this will give you a below pop-up window.
























4. Rename the Name of your choice (use your creativity:-)). In my case i have renamed the Name to RestartChrome.

5. Paste the copied url in the URL box. chrome://restart

6. Done


This URL can be now access from your bookmarks menu of the chrome and will give you a one click restart and start feature of Google Chrome to free up RAM space instantly.

Chrome has many other such features which can be very helpful. e,g. chrome://quit/ to close the chrome or chrome://bookmarks/ to view all bookmarks. To have a look at such similar features of chrome browser, copy paste the below url to the address bar.

chrome://chrome-urls/

In case you need to check how much space your chrome browser is taking in the system RAM, Right click on your task bar and click on Task Manager. You can also use the keyboard shortcut Ctrl + Shift + Esc to open the task manager.

Once the task manager is open, go to Processes, Sort by Image Name and you can see the space consumed by Chrome.exe.

Thank you for reading.

Also read my posts on:
WhatsApp launched Video Calling Feature
What is the best free software for video conversion ?
How to convert files into PDF ?
What are the few free must have apps in your system ?