1. Lệnh Ping : Cú pháp: Code: ping ip/host [/t][/a][/l][/n]



tải về 1.67 Mb.
Chế độ xem pdf
trang75/92
Chuyển đổi dữ liệu18.05.2022
Kích1.67 Mb.
#52014
1   ...   71   72   73   74   75   76   77   78   ...   92
Cac lenh co ban trong DOS

“If you're not failing every now and again, it's a sign you're not doing anything very 
innovative” - Woody Allen
REN
 
Rename a file or files. 
REN [drive:][path]SourceMask TargetMask 
RENAME is a synonym for REN 
You cannot specify a different drive or path for 
TargetMask
- use the MOVE command instead. 
Both the 
SourceMask
and 
TargetMask
can contain

and/or

wildcards
. The behavior of the 
wildcards changes slightly between source and target masks. 
SourceMask 
The sourceMask works as a filter to determine which files are renamed. The wildcards work here 
the same as with any other command that filters file names. 

Matches any 0 or 1 character except . This wildcard is greedy - it always consumes the next 
character if it is not a . However it will match nothing without failure if at name end or if the next 
character is a . 

Matches any 0 or more characters including . (with one exception below). This wildcard is not 
greedy. It will match as little or as much as is needed to enable subsequent characters to match. 
All non-wildcard characters must match themselves, with a few special case exceptions. 

Matches itself or it can match the end of name (nothing) if no more characters remain. (Note - 
a valid Windows name cannot end with .) 
{space}
Matches itself or it can match the end of name (nothing) if no more characters remain. 
(Note - a valid Windows name cannot end with {space}) 
*.
at the end, Matches any 0 or more characters except 
.
The terminating 
.
can actually be any 
combination of 
.
and 
{space}
as long as the very last character in the mask is 
.
this is the one 
and only exception where

does not simply match any set of characters. 
The above rules are not that complex. But there is one more very important rule that makes the 
situation confusing: The 
SourceMask
is compared against both the long name and the short 8.3 


name (if it exists). This last rule can make interpretation of the results very tricky, because it is 
not always obvious when the mask is matching via the short name. 
It is possible to use RegEdit to disable the generation of short 8.3 names on NTFS volumes, at 
which point interpretation of file mask results is much more straight forward. Any short names 
that were generated before disabling short names will remain. 
TargetMask 
The 
TargetMask
specifies the new name. It is always applied to the full long name; 
The 
TargetMask
is never applied to the short 8.3 name, even if the 
SourceMask
matched the 
short 8.3 name. 
The presence or absence of wildcards in the 
SourceMask
has no impact on how wildcards are 
processed in the 
TargetMask

In the following discussion

represents any character that is not 
*
,
?
, or
.
The 
TargetMask
is processed against the source name strictly from left to right with no back-
tracking. 

Advances the position within the source name as long as the next character is not . and 
appends c to the target name. (Replaces the character that was in source with c, but never 
replaces .) 

Matches the next character from the source long name and appends it to the target name as 
long as the next character is not . If the next character is 
.
or if at the end of the source name 
then no character is added to the result and the current position within the source name is 
unchanged. 

At end of sourceMask - Appends all remaining characters from source to the target. If already 
at the end of source, then does nothing. 
*c 
Matches all source characters from current position through the last occurance of c (case 
sensitive greedy match) and appends the matched set of characters to the target name. If c is 
not found, then all remaining characters from source are appended, followed by c This is the 
only situation I am aware of where Windows file pattern matching is case sensitive. 
*. 
Matches all source characters from current position through the last occurance of . (greedy 
match) and appends the matched set of characters to the target name. If . is not found, then all 
remaining characters from source are appended, followed by . 
*? 
Appends all remaining characters from source to the target. Any additional characters after 
the *? in sourceMask will be appended to target. If already at end of source then does nothing. 

without

in front - Advances the position in source through the first occurance of 
.
without 
copying any characters, and appends 
.
to the target name. If 
.
is not found in the source, then 
advances to the end of source and appends 
.
to the target name. 
After the 
TargetMask
has been exhausted, any trailing . and {space} are trimmed off the end of 
the resulting target name because Windows file names cannot end with . or {space} 
It appears these same rules also work for the target name of the COPY commmand.

tải về 1.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   71   72   73   74   75   76   77   78   ...   92




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương