BATCH ProgramminG

 

 

 

example:

 

 

md MyDir

rd MyDir

del nothing.txt

echo BlahBlah.....

pause

 

 

 

 

This code Creat a directory, and delete it ..

 

 

 

So all you need to do is just to chose What you want to put in your file ..

 

 

 

md name      //create a directory with chosen name

 

rd name      //delete a directory with chosen name, The dir most be Empty..

 

del PatchName   //Delete file/files    If your Batch file is in the same dir as the file you wanna delete, Then you only

need to write the Filename (del MyFile.exe), But if it Aint, You need to write the path to( del c:\windows\temp.dat)

 

call     //Runs an other .Bat file, And when that file is Done, Your file will continue after that call command..

 

echo HI all folks... //Print the message (HI all folks...)

 

echo off   //When you are running your .Bat file, You can see All your commands it has done on the screen, Write    echo off

so that the user can´t see what you are using for kind of commands.

 

@echo off //The '@' makes that the user can´t see what command you are using, This is only for the command with the '@'.

 

dir    //List all the files in your directory....

 

dir > info.txt    // This Command '>' Does´nt Print the output to the screen, it print it to info.txt ...

 

 

del *.exe //deletes All exe-files, u can use del c:\windows\*.exe

 

*.* //all files ..

*.dll //all dll files

e.t.c

 

copy file1 tile2 //just coping a file ...

 

if you are trying to copy a file to an excisting file, it will ask if u realy want to owerwrite it ..

But if you using:   copy a.exe b.exe /y    It won´t ask.   So just put an /y at the end ...

 

cls    //Clear the screen ...

 

pause // Print the Text   Press any key..   And waiting for A key to be pressed ...

 

 

:jupp   //creates the plase   Jupp

goto Jupp //Going to the plase Jupp

 

Example:

 

:hello

@echo hi

goto hello

 

 

 

Another example:

 

goto mio

echo This text wont be printed ....

:mio

 

 

 

 

Run a program ..

 

Just write the Program File Name.. Include Patch if it aint in the same DIr as Your batch file ..

example:

 

install.exe

//or only install, You don´t have to write .exe

 

 

START hoho.bmp   //open a document, TXT, BMP, lnk, DOC, EVERYTHING ..

 

 

 

Now, Just use your Fantasy And write Your own BATCH program .... Please E_mail me: This e-mail address is being protected from spambots. You need JavaScript enabled to view it


GSO
Written on Saturday, 03 October 2009 20:10 by GSO

Viewed 517 times so far.
Like this? Tweet it to your followers!

Rate this article

Latest articles from GSO

Latest 'tweets' from GovernmentSecurity

  • News Update: Cyber war is coming, the impact could be huge: CBS News reports that cyber.. http://bit.ly/1tx1kr | #Security Link Monday, 09 November 2009 07:35
  • News Update: Tenable Network #Security Podcast - Episode 11: Welcome to the Tenable Netw.. http://bit.ly/2Iqd6G | Security Link Monday, 09 November 2009 07:35
  • News Update: Consent will be required for cookies in Europe: EDITORIAL: A law that dema.. http://bit.ly/3JYgip | #Security Link Monday, 09 November 2009 07:35
  • News Update: CBS 60 Minutes tackles cyber-terrorism: Could hackers get into the compute.. http://bit.ly/2d5Y21 | #Security Link Monday, 09 November 2009 07:35
  • Blog Update: We have launched the new GovernmentSecurity.org: We decided to launch th.. http://bit.ly/2G1SSF | #Security Link Saturday, 07 November 2009 17:38
blog comments powered by Disqus

Site Search

Disqus Tools