亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? batch file programming.txt

?? a collection of mega hacking tools
?? TXT
?? 第 1 頁 / 共 3 頁
字號:
__________________________________________________________________



Batch File Programming By Ankit Fadia ankit@bol.net.in

__________________________________________________________________





Batch file programming is nothing but the Windows version of Unix Shell 

Programming. Let's start by understanding what happens when we give a DOS 

command. DOS is basically a file called command.com

It is this file (command.com) which handles all DOS commands that you give at the 

DOS prompt---such as COPY, DIR, DEL etc. These commands are built in with the 

Command.com file. (Such commands which are built in are called internal 

commands.).DOS has something called external commands too such as FORMAT, 

UNDELETE, BACKUP etc.



So whenever we give a DOS command either internal or external, command.com 

either straightaway executes the command (Internal Commands) or calls an external 

separate program which executes the command for it and returns the 

result (External Commands.)



So why do I need Batch File Programs? Say you need to execute a set of commands 

over and over again to perform a routine task like Backing up Important Files, 

Deleting temporary files(*.tmp, .bak , ~.* etc)

then it is very difficult to type the same set of commands over and over 

again. To perform a bulk set of same commands over and over again, Batch files 

are used. Batch Files are to DOS what Macros are to Microsoft Office and are used 

to perform an automated predefined set of tasks over and over again.



So how do I create batch files? To start enjoying using Batch files, you need to 

learn to create Batch files. Batch files are basically plain text files 

containing DOS commands. So the best editor to write your commands in would be 

Notepad or the DOS Editor (EDIT) All you need to remember is that a batch file 

should have the extension .BAT(dot bat)Executing a batch file is quite simple 

too. For example if you create a Batch file and save it with the filename 

batch.bat then all you need to execute the batch file is to type:



C:\windows>batch.bat



So what happens when you give a Batch file to the command.com to execute? 

Whenever command.com comes across a batch file program, it goes into batch 

mode. In the batch mode, it reads the commands from the batch file line by 

line. So basically what happens is, command.com opens the batch file and reads 

the first line, then it closes the batch file. It then executes the command and 

again reopens the batch file and reads the next line from it. Batch files are 

treated as Internal DOS commands.



*********************

Hacking Truth: While creating a batch file, one thing that you need to keep in 

mind is that the filename of the batch file should not use the same name as a 

DOS command. For example, if you create a batch file by the name dir.bat and then 

try to execute it at the prompt, nothing will happen.

This is because when command.com comes across a command, it first checks to see 

if it is an internal command. If it is not then command.com checks if it a .COM, 

.EXE or .BAT file with a matching filename.

All external DOS commands use either a .COM or a .EXE extension, DOS never 

bothers to check if the batch program exits.

*********************

Now let's move on to your first Batch file program. We will unlike 

always(Normally we begin with the obligatory Hello World program) first take up 

a simple batch file which executes or launches a .EXE program. Simply type the 

following in a blank text file and save it with a .BAT extension.



C:

cd windows

telnet



Now let's analyze the code, the first line tells command.com to go to the C:

Next it tells it to change the current directory to Windows. The last line tells it to 

launch the telnet client. You may contradict saying that the full filename is 

telnet.exe. Yes you are right, but the .exe extension is automatically added by 

command.com. Normally we do not need to change the drive and the directory as 

the Windows directory is the default DOS folder. So instead the bath file 

could simply contain the below and would still work.



telnet



Now let's execute this batch file and see what results it shows. Launch 

command.com (DOS) and execute the batch file by typing:



C:\WINDOWS>batch_file_name



You would get the following result:



C:\WINDOWS>scandisk



And Scandisk is launched. So now the you know the basic functioning of Batch 

files, let' move on to Batch file commands.



The REM Command



The most simple basic Batch file command is the REM or the Remark command. It is 

used extensively by programmers to insert comments into their code to make it 

more readable and understandable. This command ignores anything there is on that 

line. Anything on the line after REM is not even displayed on the screen during 

execution. It is normally not used in small easy to understand batch programs but 

is very useful in huge snippets of code with geek stuff loaded into it. So if we 

add Remarks to out first batch file, it will become:



REM This batch file is my first batch program which launches the fav hacking 

tool; Telnet



telnet



The only thing to keep in mind while using Remarks is to not go overboard and 

putting in too many of them into a single program as they tend to slow down the 

execution time of the batch commands.



ECHO: The Batch Printing Tool



The ECHO command is used for what the Print command is in other programming 

languages: To Display something on the screen. It can be used to tell the user 

what the bath file is currently doing. It is true that Batch programs display all 

commands it is executing but sometimes they are not enough and it is better to 

also insert ECHO commands which give a better description of what is presently 

being done. Say for example the following batch program which is full of the ECHO 

command deletes all files in the c:\windows\temp directory:



ECHO This Batch File deletes all unwanted Temporary files from your system

ECHO Now we go to the Windows\temp directory.

cd windows\temp

ECHO Deleting unwanted temporary files....

del *.tmp

ECHO Your System is Now Clean



Now let's see what happens when we execute the above snippet of batch code.



C:\WINDOWS>batch_file_name 

C:\WINDOWS>ECHO This Batch File deletes all unwanted Temporary files from your 

system

C:\WINDOWS>ECHO Now we go to the Windows\temp directory.

Now we go to the Windows\temp directory.

C:\WINDOWS>cd windows\temp

Invalid directory

C:\WINDOWS>ECHO Deleting unwanted temporary files

Deleting unwanted temporary files...

C:\WINDOWS>del *.tmp

C:\WINDOWS>ECHO Your System is Now Clean

Your System is Now Clean



The above is a big mess! The problem is that DOS is displaying the executed 

command and also the statement within the ECHO command. To prevent DOS from 

displaying the command being executed, simply precede the batch file with the 

following command at the beginning of the file:



ECHO OFF



Once we add the above line to our Temporary files deleting Batch program , the 

output becomes:



C:\WINDOWS>ECHO OFF

This Batch File deletes all unwanted Temporary files from your system

Now we go to the Windows\temp directory.

Invalid directory

Deleting unwanted temporary files...

File not found

Your System is Now Clean



Hey pretty good! But it still shows the initial ECHO OFF command. You can prevent 

a particular command from being shown but still  be executed by preceding the 

command with a @ sign. So to hide even the ECHO OFF command, simple replace the 

first line of the batch file with @ECHO OFF



You might think that to display a blank line in the output screen you can simply 

type ECHO by itself, but that doesn't work. The ECHO command return whether the 

ECHO is ON or OFF. Say you have started your batch file with the command ECHO OFF 

and then in the later line give the command ECHO, then it will display ' ECHO is 

off ' on the screen. You can display a blank line by giving the command 

ECHO.(ECHO followed by a dot)Simply leaving a blank line in the code too 

displays a blank line in the output.



You can turn ON the ECHO anytime by simply giving the command ECHO ON. After 

turning the echo on , if you give the command ECHO then it will return ' ECHO is 

on '



The PAUSE Command: Freezing Time



Say you create a batch file which shows the Directory Listing of a particular 

folder(DIR) before performing some other  task. Or sometimes before deleting all 

files of a folder, you need to give the user time to react and change his 

mind. PAUSE, the name says it all, it is used to time out actions of a script.

Consider the following scenario:



REM This Batch program deletes *.doc files in the current folder.

REM But it gives the user to react and abort this process.

@ECHO OFF

ECHO WARNING: Going to delete all Microsoft Word Document

ECHO Press CTRL+C to abort or simply press a key to continue.

PAUSE

DEL *.doc



Now when you execute this batch program, we get the following output:



C:\WINDOWS>a.bat

WARNING: Going to delete all Microsoft Word Document

Press CTRL+C to abort or simply press a key to continue.

Press any key to continue . . .



The batch file program actually asks the user if he wishes to continue and gives 

the user the option to abort the process. Pressing CTRL+C cancels the batch file 

program(CTRL+C and CTRL+Break bring about the same results)



^C



Terminate batch job (Y/N)?y



After this you will get the DOS prompt back.



****************

HACKING TRUTH: Say you have saved a batch file in the c:\name directory. Now when 

you launch command.com the default directory is c:\windows and in order to 

execute the batch file program stored in the c:\name directory you need to 

change the directory and go to c:\name.This can be very irritating and time 

consuming. It is a good practice to store all your batch programs in the same 

folder. You can run a batch file stored in any folder(Say c:\name) from 

anywhere(even c:\windows\history) if you include the folder in which the batch 

file is stored (c:\name)in the AUTOEXEC.BAT file, so that DOS knows which folder 

to look for the batch program.

So simply open c:\autoexec.bat in Notepad and append the Path statement to the 

following line[c:\name is the folder in which all your batch files are stored.]:



SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\name



Autoexec.bat runs each time at startup and DOS knows each time, in which 

directory to look for the batch files.

********************



Parameters: Giving Information to Batch Programs



To make batch programs really intelligent you need to be able to provide them 

with parameters which are nothing but additional valuable information which is 

needed to ensure that the bath program can work efficiently and flexibly.

To understand how parameters work, look at the following script:



@ECHO OFF

ECHO First Parameter is %1

ECHO Second Parameter is %2

ECHO Third Parameter is %3



The script seems to be echoing(printing) messages on the screen, but what do the 

strange symbols %1 , % 2 etc stand for? To find out what the strange symbols 

stand for save the above script and go to DOS and execute this script by passing 

the below parameters:



C:\windows>batch_file_name abc def ghi



This batch file produces the following result:



C:\windows>batch_file_name abc def ghi

First Parameter is abc

Second Parameter is def

Third Parameter is ghi



The first line in the output is produced by the code line:



ECHO First Parameter is %1



Basically what happens is that when DOS encounters the %1 symbol, it examines 

the original command used to execute the bath program and look for the first 

word (argument) after the batch filename and then assigns %1 the value of that 

word. So one can say that in the ECHO statement %1 is replaced with the value of 

the first argument. In the above example the first word after the batch file name 

is abc, therefore %1 is assigned the value of this word.



The %2 symbol too works in the similar way, the only difference being that 

instead of the first argument, DOS assigns it the value of the second argument, 

def. Now all these symbols, %1, %2 are called replaceable parameters. Actually 

what happens is that %1 is not assigned the value of the first argument, but 

in fact it is replaced by the value of the first argument.



If the batch file command has more parameters than what the batch file is 

looking for, then the extras are ignored. For example, if while executing a batch 

file program , we pass four arguments, but the batch file program requires only 

3 parameters, then the fourth parameter is ignored.



To understand the practical usage of parameters, let's take up a real life 

example. Now the following script requires the user to enter the name of the 

files to be deleted and the folder in which they are located.



@ECHO OFF

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区久久精品爱涩| 国产精品视频一二三区| 无吗不卡中文字幕| 欧美人与禽zozo性伦| 亚洲一区二区成人在线观看| 欧美日韩精品一区视频| 日本成人在线电影网| 精品国产成人系列| 国产精品亚洲成人| 亚洲天堂精品在线观看| 欧美中文字幕一区二区三区亚洲 | 在线亚洲高清视频| 香蕉久久夜色精品国产使用方法| 欧美日韩国产首页在线观看| 奇米888四色在线精品| 26uuu亚洲综合色| 大胆欧美人体老妇| 亚洲午夜久久久久久久久久久| 91精品国产91久久久久久最新毛片| 久久99热这里只有精品| 欧美国产乱子伦| 欧美性大战xxxxx久久久| 蜜臂av日日欢夜夜爽一区| 欧美激情艳妇裸体舞| 欧美日韩三级视频| 国产一区二区三区免费在线观看| 国产精品福利影院| 在线不卡的av| 懂色av一区二区三区免费看| 亚洲高清免费观看| 久久久亚洲精品石原莉奈| av在线免费不卡| 蜜桃视频在线观看一区| 中文字幕在线观看一区二区| 欧美福利视频导航| 成人深夜福利app| 日本不卡不码高清免费观看| 中文字幕一区二区三区不卡| 欧美tickling网站挠脚心| 色婷婷国产精品综合在线观看| 久久99国产精品成人| 依依成人精品视频| 久久蜜臀精品av| 欧美男女性生活在线直播观看 | 国产成人免费在线观看不卡| 亚洲va国产天堂va久久en| 中文字幕va一区二区三区| 91精品国产欧美一区二区18| 91在线看国产| 国产高清成人在线| 蜜臀91精品一区二区三区 | 亚洲午夜精品网| 国产亚洲人成网站| 欧美一级在线免费| 精品视频123区在线观看| bt7086福利一区国产| 国内精品国产成人国产三级粉色| 亚洲一区二区三区免费视频| 国产精品女人毛片| 久久久久国产精品麻豆| 日韩午夜在线观看| 欧美日韩另类国产亚洲欧美一级| av亚洲精华国产精华精华| 国产一区激情在线| 日韩va亚洲va欧美va久久| 亚洲综合精品自拍| 中文字幕在线一区免费| 国产日产亚洲精品系列| 精品久久久久久久久久久院品网 | 国产三级三级三级精品8ⅰ区| 欧美喷潮久久久xxxxx| 欧美日韩一区二区电影| 色综合久久久久综合体桃花网| 成人av电影免费在线播放| 国产福利一区二区三区在线视频| 国产一区二区三区精品视频| 麻豆精品视频在线观看免费| 免费看精品久久片| 久久精品国产秦先生| 激情综合色播五月| 狠狠久久亚洲欧美| 国产精华液一区二区三区| 国产麻豆精品在线| 成人美女在线视频| 成人福利视频网站| 色8久久精品久久久久久蜜| 日本丶国产丶欧美色综合| 欧美性一二三区| 欧美日韩亚洲另类| 欧美一区二区免费| 精品1区2区在线观看| 久久九九久精品国产免费直播| 欧美国产激情一区二区三区蜜月| 国产欧美一区二区精品婷婷| 日韩一区日韩二区| 亚洲一区在线观看免费| 亚洲va天堂va国产va久| 麻豆freexxxx性91精品| 国产激情视频一区二区三区欧美| 波多野结衣中文一区| 91精品91久久久中77777| 678五月天丁香亚洲综合网| 日韩精品中午字幕| 中文在线一区二区| 一区二区欧美精品| 秋霞电影网一区二区| 国产成人亚洲精品青草天美| 91视频免费播放| 欧美日韩第一区日日骚| 精品国产污污免费网站入口| 中文av一区二区| 亚洲电影第三页| 国产一区啦啦啦在线观看| 色综合视频在线观看| 91精品国产免费| 国产精品看片你懂得| 天天操天天综合网| 成人蜜臀av电影| 欧美一卡二卡三卡四卡| 国产欧美日韩不卡| 亚洲成av人片一区二区三区| 国产精品99久久不卡二区| 欧美手机在线视频| 国产日韩欧美不卡在线| 亚洲成人动漫在线免费观看| 丁香啪啪综合成人亚洲小说 | 蜜臀av国产精品久久久久| 99国产精品视频免费观看| 日韩一区二区在线观看| 国产精品久久影院| 精品系列免费在线观看| 色哟哟欧美精品| 欧美极品少妇xxxxⅹ高跟鞋 | 国产成人福利片| 欧美伦理视频网站| 中文字幕欧美国产| 美女在线观看视频一区二区| 日本精品免费观看高清观看| 日本一区二区免费在线| 日韩av不卡在线观看| 99国产精品国产精品久久| 久久蜜桃一区二区| 日本在线不卡视频一二三区| 在线视频亚洲一区| 国产精品美女久久久久aⅴ国产馆| 青青草视频一区| 欧美亚洲尤物久久| 国产精品久久久久久久久免费樱桃| 久久综合综合久久综合| 欧美精品日日鲁夜夜添| 亚洲一级电影视频| 色综合色综合色综合| 欧美激情在线观看视频免费| 精品一区二区三区视频在线观看 | 欧美zozozo| 日韩高清一级片| 欧美午夜精品理论片a级按摩| 6080午夜不卡| 图片区小说区国产精品视频| 97se亚洲国产综合自在线观| 国产欧美日韩三级| 国产宾馆实践打屁股91| 久久久久久一二三区| 免费av成人在线| 秋霞影院一区二区| 国产91精品一区二区麻豆网站| 欧美在线免费观看视频| 久久久国产精品午夜一区ai换脸| 亚洲成人手机在线| 成人av在线网| 日韩精品专区在线影院重磅| 亚洲一区二区三区四区五区中文| 国产精品主播直播| 91精品婷婷国产综合久久| 1000精品久久久久久久久| 久久99久久精品| 7777精品伊人久久久大香线蕉经典版下载| 国产日韩av一区二区| 久久国产精品99精品国产| 欧美在线视频全部完| 亚洲手机成人高清视频| 国产mv日韩mv欧美| 日韩美女视频在线| 五月婷婷综合激情| 欧美三级午夜理伦三级中视频| 国产精品高清亚洲| 成人丝袜18视频在线观看| 久久亚洲综合色| 美脚の诱脚舐め脚责91| 欧美剧情片在线观看| 亚洲一区二区黄色| 欧美亚洲国产一卡| 亚洲老司机在线| 一本色道久久综合亚洲aⅴ蜜桃 | 国产激情精品久久久第一区二区| 欧美电影免费观看高清完整版在 | 亚洲一区二区三区爽爽爽爽爽| 91麻豆蜜桃一区二区三区| 中文字幕一区在线观看| 成人动漫视频在线|