Skip to content

How To Blog

  • Difference between Windows 7 Home, Professional and Ultimate Windows 7
  • How to Turn On Auto-Complete in the Command Prompt Computer Tips
  • Sum a Table Column in Word Office Tips
  • How Philips Hue Sync Can Transform Your Entertainment Smart Home
  • Best Vertical Mouse to Reduce Wrist Strain Product Reviews
  • 5 Best Apps to Download Music for Free on Android 2022 Software Reviews
  • How to Use OpenPGP to Secure Email How-To
  • How to Turn Off Microsoft Launcher on Android quickly How-To

How To Make a BAT File In Three Simple Steps

Posted on October 7, 2020 By blog_786 No Comments on How To Make a BAT File In Three Simple Steps

Do you find yourself opening the same programs every time you start your computer? Do you always open Command Prompt so you can run the same commands all the time? Learning how to create a BAT file can save you a lot of time by automating these steps.

A BAT file is a special text format with a .bat extension that runs a series of command line commands in the sequence you specify. You can create a BAT file that automates everything you do on the command line.

How To Make a BAT File In Three Simple Steps

What can you do with a BAT file?

  • Change system settings
  • Automate website launches
  • Run multiple applications on schedule
  • Automate system backups

In this tutorial, you will learn how to create and run your first batch file in Windows 10. You will also learn how to perform advanced automation using the BAT file and how to schedule this automation using the Task Scheduler.

Create a BAT file in three steps

Creating a BAT file in Windows 10 is very easy. All you need is a Notepad. You just need to create a text file with properly formatted BAT commands Then save the file with the .bat extension and run it.

However, there are a few important points to keep in mind along the way, so let’s work on the steps.

– /

In this section, you will learn how to create an automatic BAT file that launches Chrome on your favorite news web page, clears Windows 10 cache for better system performance, and gets the latest weather forecast from the Internet.

Step 1. Create a Simple Batch Startup File

Step 1: Create a simple startup batch file

To create a BAT file in Windows 10, simply select the Start menu, type Notepad and select the Notepad app to open it. Inside Notepad, you will need to enter the following script. You can copy and paste from there to Notepad.

start https://news.google.com
DEL / F / S / Q% TEMP%
finger [email protected]
pause

Save the file somewhere on your computer so it’s easy to find. Many people save their BAT files to C: temp or some simple folder located at the root level of the C: drive

It’s important to change the File Type dropdown menu to All Files. Then don’t forget to add “.bat” at the end of the file name.

How To Make a BAT File In Three Simple Steps

This will save the text file as a batch file.

Now open that directory in Windows Explorer and double-click the BAT file you just created. When you do this, you will see the following steps follow in sequence.

  1. The Google News web page will open using the default browser on your system.
  2. All files in the Windows temp folder will be deleted.
  3. The command line will display the weather forecast for the next 24 hours.

How To Make a BAT File In Three Simple Steps

You’ve just created your first working BAT file that automates three useful tasks in a row!

However, you are not finished yet. You need to adapt some of these commands to suit your situation. Let’s take a look at what each of these commands do and how you can customize them to suit your needs.

Step 2: Customize your BAT file

Now that you know how to create a BAT file with multiple commands, you need to customize each of these commands according to your needs.

Below is a more detailed explanation of each of these commands and how to configure them.

Launch command

The start command will launch any application you specify. If you use a url like this command, it will use your default browser to open this web page. The following command will launch Google News in your default browser.

start https://news.google.com

You can change the URL so that the command opens any web page you like.

DEL Command

The DEL command is very simple, it deletes one or more files in a given directory. You can use many parameters to tell the command how to behave.

DEL / F / S / Q% TEMP%

There are many parameters you can use to tell the command how to behave.

  • / F – enables deletion of read-only files.
  • / S – Deletes files in subdirectories, as well as in the current directory
  • / Q – “Quiet” mode is required, which does not require confirmation of deletion.

In this example,% TEMP% is used to specify a directory. This is the system environment variable for the Windows temporary files directory.

You can specify any other directory if you want. Or you can list multiple DEL commands and delete files from multiple directories.

Finger Command

The Finger command uses your computer’s Internet connection to connect to any remote computer that is running the finger service.

They are not easy to find, but there is one special service on the graph.no site that allows you to view the 24 hour weather forecast with a simple finger command.

finger [email protected]

With this command, you just need to put the name of the largest nearby city before the @ graph.no part of the web address.

The command returns a graph of the temperature and sunlight level symbols for the next 24 hours.

Pause command

The Pause command pauses execution of your BAT file so you can see any information returned by various commands. This is especially useful after using the Finger command so that you can view the graph.

If you are using other commands and you do not need to see any information returned, you can remove the Pause command at the end of the script.

In fact, if you don’t need to see anything from the script at all, you can add @ECHO OFF as the first line of the BAT file, and you won’t see anything returned by the commands at all.

Step 3: Schedule the batch task

Once you create a BAT file, it won’t do much good unless you manually double-click and run it whenever you want to run automatic commands.

It would be much easier to let the batch job run automatically every day. You can do this by running the BAT file as a Windows Scheduled Task.

To do this, select the “Start” menu, enter “Scheduler” and select “Task Scheduler”.

How To Make a BAT File In Three Simple Steps

This will open the Task Scheduler Select “Task Scheduler Library” in the left pane to view all scheduled tasks on your system.

You can add a new scheduled task to run a new BAT file. To do this:

  1. Select New Task in the Actions pane on the right.

  1. In the New Task window, General tab, give the task a name in the Name field. Leave all other settings as default.

How To Make a BAT File In Three Simple Steps

  1. Select the Triggers tab. Click the Create button. In the New Trigger window, select Daily and leave all other settings as default. Select OK and then click OK on the New Task window.

How To Make a BAT File In Three Simple Steps

  1. Click the Actions tab and select New. In the New Action window, select Browse and navigate to where you saved your BAT file. Click OK to finish. Click “OK” in the “Create Task” window.

How To Make a BAT File In Three Simple Steps

  1. You should now see the scheduled BAT file in the Task Scheduler library.

How To Make a BAT File In Three Simple Steps

How To Make a BAT File In Three Simple Steps

Your new scheduled BAT file will now run at the same time every day.

Customize your BAT file

Now that you know how to create and schedule your BAT file, you can start expanding that file by learning about other BAT file commands that you can add to the file.

There are many CMD commands you can add to your BAT file to automate anything on your computer. Start experimenting and see what cool things you can create from your own batch files.

–

How-To

Post navigation

Previous Post: How To Manage Your Zoom Recordings History
Next Post: How To Animate An Image In Photoshop

Related Posts

  • How to Clean your iPhone Share Sheet? How-To
  • All Firestick Remote Shortcuts You Should Know About How-To
  • How to Remove Background Noise in Skype Calls How-To
  • How To Change Your Skype Name How-To
  • How to Only See Videos From YouTube Channels You Have Subscribed To How-To
  • Find out How Well Two Person Know Each Other on Facebook How-To

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress

Recent Posts

  • What if iMessage is not working on iPhone? Here are 12 ways to fix it
  • Logitech Unifying Receiver Not Working? 11 Fixes to Try
  • What to Do When a Friend’s Facebook Account is Hacked or Duped
  • 10 best clock widgets not to be lost on your iPhone home screen
  • Can I change the file type in Windows 10?

Recent Comments

  1. Can I change the file type in Windows 10? - How To Blog on The 7 Best PDF Readers for Windows In 2020
  2. How to create line graphs in Google Sheets - How To Blog on How To Format Spreadsheet Cells To Automatically Calculate Amounts
  3. Best Ways to Create Your Own 3d Printed Lithophanes? - How To Blog on 10 Best 3D Printers for Beginners Under $500
  4. Top 5 3D Modeling Apps for iPad Pro - How To Blog on How To Use Apple Sidecar
  5. The 5 Best Original Netflix Animations You Can Stream Now - How To Blog on check netflix video quality internet explorer
  • The 12 Best Bookmarklets Every Browser Should Have Cool Websites
  • How to Find Your Bluetooth Adapter Version in Windows 10 Windows 10
  • The 6 Best Xbox PC Game Pass Games

    The 6 Best Xbox PC Game Pass Games

  • How To Optimize The Paging File In Windows Computer Tips
  • View the List of Services Hosted by the svchost.exe Process in Windows How-To
  • HDD Raid Vs SSD Raid: The Major Differences You Should Know Reviews
  • How To Play Blu-Ray Discs On Your Computer Windows 10
  • How to Make an Instagram Guide Computer Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version