Batch file

Batch Files are very useful because they can be used to copy a lot of files with a click of a mouse. All you have to do is write the batch file and run it. You need to know MS-Dos/command prompt commands to make batch files work since batch files use MS-DOS as it main instructional language.

You use Notepad or any other Text editor and save the file with a .bat extension, you need to save as type to “All File *.*”

Save batch files as .Bat

1. Start more then one file or program with a click of a mouse.

@ECHO OFF
Start ” ” “Paste file path to file in between the quotes”
Start ” ” “C:\Users\johnson\Desktop\listen.pls”

2. Copy all files and folder in a folder called Stuff on drive C:\ to U:\ and verify the files copied correctly.

U:
md stuff
cd stuff
xCOPY /e /v C:\stuff
pause

3. Run IPconfig /all

@echo off
c:\windows\system32\ipconfig.exe /all
@pause

4.Run NSlookup to find the NS IP of a website.

@echo off
c:\windows\system32\nslookup.exe
@pause

To edit a batch file you need to open it with Notepad or right click the batch files and pick edit.

Edit Batch File

You can make more batch files by typing more MS-DOS commands in your batch files. To Prevent your command prompt window from closing type pause to the end of your batch file.

Happy Batching!

Share Online:
  • Digg
  • Twitter
  • Facebook
  • Technorati
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • FriendFeed
  • Reddit
  • MySpace
  • Slashdot
  • Mixx
  • NewsVine
  • Simpy
  • Diigo
  • Fark
  • Ping.fm
  • Propeller
  • Suggest to Techmeme via Twitter
  • RSS
  • email

Related stories you be interested in: