|
|
发表于 2006-12-17 22:47:56
|
显示全部楼层
比如有1.txt 2.txt 3.txt 目标文件a.txt
. P3 I0 f' b- u: X! _那么切换到1.txt
+ v1 y. f. A, U, ]9 O8 {. Aren a.txt 1.txt: r D) g7 N8 c
ren a.txt 2.txt
/ J$ N1 C/ s+ Y! Cren a.txt 3.txt( A( N8 ~: `$ \, C7 F5 _9 Z
ren 1.txt a.txt+ C1 c5 D i7 @# ^- _
切换到2.txt% f1 h5 J4 H( n; ~) z
ren a.txt 1.txt
/ ^, y3 F% Q9 o( v/ Dren a.txt 2.txt
( c/ N9 K- d- B# Bren a.txt 3.txt
- B( H5 V) s3 Z9 s2 C: _ Gren 2.txt a.txt) u8 o3 f1 d: l$ n
切换到3.txt
6 F4 Z( l/ q. K; }$ Q- Yren a.txt 1.txt
( H( v4 W" g5 q, yren a.txt 2.txt
. r, e" {: w# I" Bren a.txt 3.txt* ~! ~0 U% d5 ^! a' Z6 F/ G" R
ren 3.txt a.txt
) C4 r3 E8 d5 U6 x, s/ x
* [+ j2 Q7 e8 f, q4 L" u% _批处理中的某个命令一旦错误,会自动跳过,进入下一个命令,好好利用这个特性,不用if之类的) R& K6 q5 D: S- L
不信你可以自己试试看,我试过了,可以 |
|