|
|
发表于 2006-12-17 22:47:56
|
显示全部楼层
比如有1.txt 2.txt 3.txt 目标文件a.txt
0 Z% g$ Q7 c: U, v那么切换到1.txt
- y* k' `: W! o- k& D! x8 Bren a.txt 1.txt
0 n' S* W5 e$ o' ?ren a.txt 2.txt
0 H4 H- j( U @7 H# t% y: n0 a! Vren a.txt 3.txt
" x$ u$ ~$ Y4 B' ?! mren 1.txt a.txt
7 N; o& i$ e% E1 ]& w$ b切换到2.txt
( |6 t/ w& a4 l2 P% Y0 F; @% Jren a.txt 1.txt
! N4 c# E! S4 y4 B( m3 G" w1 Zren a.txt 2.txt# j: O/ X$ Z9 z! S
ren a.txt 3.txt
, ~/ ?- D/ D( n, y' X" oren 2.txt a.txt
# h G5 P# @+ a( e3 R切换到3.txt
* {8 i9 V, S! Vren a.txt 1.txt
. I) s; H0 M5 L j! Lren a.txt 2.txt
1 @) y& j9 C, r r% d! {ren a.txt 3.txt
+ g' }9 G7 ]7 }8 }, Xren 3.txt a.txt
* d, X3 N! q, `9 b' [- Z) b$ W2 H2 x. {9 G1 z
批处理中的某个命令一旦错误,会自动跳过,进入下一个命令,好好利用这个特性,不用if之类的# v5 D( {4 m4 f( X' O. B# N
不信你可以自己试试看,我试过了,可以 |
|