MASIGNCLEAN104

What are Batch files in Windows? Fun and cool Batch files tricks

iklan banner

Batch files inwards Windows are the script files. Influenza A virus subtype H5N1 batch file is an unformatted text file. This file consists of a serial of commands in addition to has a .bat or .cmd file hollo extension. The term “batch” is adapted from batch processing – which agency non-interactive execution. With batch files inwards Windows, users tin mail away simplify repetitive or routine tasks. When users type the file hollo at the ascendence prompt, cmd.exe runs the commands sequentially, equally they seem inwards the file. Some typical commands used inwards the batch files inwards Windows are – Call, Echo, Endlocal, For, Goto, If, Pause, Rem, Setlocal, in addition to Shift.

How to practice .bat or batch files inwards Windows

As mentioned earlier, a batch file contains a serial of DOS commands in addition to are used to automate the often performed tasks. Thus, you lot don’t accept to repeatedly write the same commands.

A batch file is created using a Notepad. The text file consists of the commands you lot desire to execute.  To create a Batch file, you lot accept to write the ascendence equally text inwards Notepad, in addition to salve the file equally a .bat file. To execute a command, you lot exactly demand to double-click the batch file. Hence, a well-written batch file inwards Windows tin mail away salve a lot of time.

Some basic Commands inwards Batch Files:

  • ECHO: To display the text on the screen
  • @ECHO OFF: To shroud the text
  • START: To run a file amongst its default application
  • REM: To move inwards a comment business inwards the program
  • MKDIR: To practice directories
  • RMDIR: To take away directories
  • DEL: To delete files
  • COPY: To re-create a file or files
  • XCOPY: To re-create files amongst extra options
  • FOR/IN/DO: To specify files
  • TITLE: To edit the championship of the window

Cool in addition to fun batch file tricks

1. Matrix

 Influenza A virus subtype H5N1 batch file is an unformatted text file What are Batch files inwards Windows? Fun in addition to cool Batch files tricks

Remember the painting ‘Matrix’? You tin mail away genuinely brand your background resemble that greenish Matrix covert amongst this batch file. It is definitely for the cool hold off in addition to cypher else. To practice this variety of batch files inwards Windows, follow these steps:

Step 1: Open a Text Document in addition to rename it equally “matrix.bat”. As shortly equally the text file’s extension is changed to .bat, its icon changes to a gear.

 Influenza A virus subtype H5N1 batch file is an unformatted text file What are Batch files inwards Windows? Fun in addition to cool Batch files tricks

Step 2: Now you lot tin mail away edit the file to write your program. For this, right-click on the file in addition to click on ‘Edit’. It should opened upwards inwards a notepad. Here are the ascendence lines that you lot demand to glue on the notepad.

@echo offcolor 2:startecho %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% goto start

Click on ‘Save’ in addition to double click on it. It volition give the Matrix number inwards a window. Maximize the CMD windows in addition to press F11 to larn a meliorate full-screen effect.

2. Password Creator

You tin mail away fifty-fifty practice a password protected file that is created in addition to accessed using a Batch (.bat) file. This is 1 of the lightly useful batch files inwards Windows that should run exactly fine for hiding things from people amongst lilliputian or no reckoner or batch file knowledge.

Follow these steps to practice the Password Creator batch files inwards Windows:

Step 1: Open Notepad

Step 2: Copy in addition to glue the next code:

cls@ECHO OFFchampionship Cyber Attack Weapon Systemif EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCKif NOT EXIST Hidden goto MDHidden:CONFIRMecho Are you lot certain to lock this folder? (Y/N)set/p "cho=>"if %cho%==Y goto LOCKif %cho%==y goto LOCKif %cho%==n goto ENDif %cho%==N goto ENDecho Invalid choice.goto CONFIRM:LOCKren Hidden "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"echo Folder lockedgoto End:UNLOCKecho Enter password to Unlock Your Secure Folderset/p "pass=>"if NOT %pass%== 1234 goto FAILgoto UNLOCK2:UNLOCK2CLSecho Enter password to Unlock Your Secure Folderset/p "pass=>"if NOT %pass%== 1234 goto FAILattrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Hiddenecho Folder Unlocked successfullygoto End:Fail@echo offcolor 02echo Warning-Virus Initiated amount hardrive corruption imminenttimeout /t five /nobreak >nulready count= 0:tricksif %count% == 200 goto shutdownecho %random%%random%%random%%random%%random%%random%%random%%random%ready /a count=%count%+1goto tricks:shutdowncls:shutdownshutdown -s -t 45 /c "You accept tried to acces a file that is non yours. Good-Bye."echo Enter password Start Abort Sequenceset/p "pass=>"if NOT %pass%== 1234 goto shutdownecho Abort Inittiatedgoto Abort:AbortC:\Windows\System32\shutdown.exe -aAbort Successfultimeout /t three /nobreak >nulCLSgoto unlockgoto end:MDHiddenmd Hiddenecho Hidden created successfully

Step 3: Set the password

The passwords are ready past times default to 1234. They tin mail away likewise hold upwards changed. To modify the password, uncovering inwards the code where it says:

if NOT %pass%== 1234 goto

And supervene upon 1234 amongst your password of choice. Save the file amongst .bat extension.

When you lot opened upwards the file for the commencement time, it volition flash, in addition to unopen to other file volition seem named “Hidden”. To shroud this file, exactly click the master file over again in addition to it volition inquire you lot if you lot desire to shroud the file.  If you lot type Y, hence it hides it, but if you lot type N, cypher happens. After you lot shroud it in addition to afterwards desire to access it, you lot demand to click the master file again, in addition to it volition prompt you lot for a password.

However, you lot demand to hollo upwards that the method is non fool proof. Anyone amongst lilliputian noesis or sense inwards reckoner systems in addition to Batch files volition most probable hold upwards able to circumvent it rather quickly.

3. Color Tester

 Influenza A virus subtype H5N1 batch file is an unformatted text file What are Batch files inwards Windows? Fun in addition to cool Batch files tricks

If you lot desire to endeavor color testing using the batch files inwards Windows, hence hither is a code for it. It's simple, in addition to it tin mail away hold upwards pretty useful.

Open a notepad in addition to copy-paste the next code.

@echo off:testassistance colorecho ----------------------------------------------------------echo.echo Type a color code to exam colors.echo To exit, exactly press the X.set/p color=color %color%goto test

Save the files amongst an extension of .bat.

If you lot desire to know to a greater extent than virtually such Batch file tricks inwards Windows, you lot may catch Instructable.com.


Source: https://www.thewindowsclub.com/
Share This :