Skip to main content

How To Create A Simple Batch File For Windows

 

 

How To Create A Simple Batch File For Windows

Hackers can create very dangerous batch files which can destroy your computer but here we are going to teach you on how to create a simple windows batch file. Batch files are created using Microsoft Notepad
How to create a simple batch file for windows
Step 1: Right-click on desktop and choose Text Document. Now you can see a plain text file when you open it.
Step 2: Google the commands which you need to create a simple batch file
Note: Below you find a simple batch file that displays some text.
Step 3: Type “@echo off” so that the code is not displayed in the final form.
Step 4: Next line type “echo” then press space and add the information you want to  display (example: echo my first batch program)
Step 5: Press enter to go next line and write “pause” so the windows stops.
Step 6: Now Save your file
Step 7: Give a name to your file and save it in .BAT extension.
Now your done! You have created a simple windows batch file. If you run the batch file you can see your batch file showing you the content which you have written after “echo“. You can also add title to your batch file by adding the code “title” (example: title Latest hacking news)
Capture
List of Batch commands  
  • APPEND  Set or display search path for files.
  • ASSIGN  The command redirects requests for disk operations on one drive to a different drive. It can also display drive assignments or reset all drive letters to their original assignments.
  • ATTRIB Change or view attributes of one or more files.
  • BACKUP and RESTORE Original commands to backup and restore files. Replaced later on by CPBACKUP or MSBACKUP
  • CALL  Invokes a Batch program from another Batch program
  • CHCP Displays or changes the active code page used to display character glyphs in a console window.
  • CHKDSK Checks a specific storage volume.
  • CHOICE Prompts user to choose from several options.
  • CLS Clears the terminal screen.
  • COPY Copies files to a specific location.
  • DATE Displays system date.
  • DEL and ERASE Delete one or more files.
  • DIR Shows contents of a directory.
  • ECHO Displays text on screen.
  • EXIT Closes the program.
  • FC and COMP Compares two files and shows differences.
  • FOR A loop syntax based on a set of conditions.
  • MD or MKDIR Creates a new directory.
  • MOVE Moves files to a specific location.
  • PATH Displays or sets a search path for executable files.
  • PAUSE Suspends all activity until user input.
  • RD and RMDIR Removes a directory.
  • REM Adds comment without any action.
  • REN Renames a file.
  • SORT Filters input data and sends it to output data stream.
  • TIME Displays system time.
  • TITLE Modifies the program title (shown in title bar).
  • UNDELETE Restores files deleted with the DEL command
  • XCOPY Copies entire directory tree.

Comments

Popular posts from this blog

Problem: Date Formatting cannot be Changed in Microsoft Excel

In this article, we will learn how to change the date formatting. We will use “Text to Column” wizard to resolve the problem of change the date formatting in Microsoft Excel. Let’s understand the functions: - Text to Column:  “Text to Column” is used for separating the cell content which is depending on the way your data is arranged. You can divide the data on the basis of content in the cell such as space, comma, period, semicolon, etc. Let’s take an example and understand how we can convert the date into Text. We have dates, foramatted as text in column A. Now, we want to convert it into date format.     If we want to convert the formatting into numbers, then we need to follow below given steps:- Select the range A2:A11. Go to Data tab, and click on Text to Columns from the Data tools group.     Covert Text to Columns Wizard – Step1 of 3 dialog box will appear. Select fixed width, and click on Next button.     Skip step-2, and...
What is ssh? SSH , or Secure Shell, is a protocol used to securely log onto remote systems. It is the most common way to access remote Linux and Unix-like servers. ssh commands: If your username on the remote system is the same as your username on your local system:                               #ssh remote_host remote_host means ip address or domain name that you are trying to connect to. If your username is different on the remote system, you can specify it by using this syntax:                         #ssh remote_username@remote_host How to Set Up SSH on Linux systems Edit the configuration file of sshd #vim /etc/ssh/sshd_config It may be a good idea to change this to a non-standard port to help obscure your ...