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
