change all file name in once

2010-02-11 8:33 am
I have a bun of photo files (3000 file) just recovered it, and want to change those file name from xxx.CHK to xxx.jpg all in one time. how to do it?

回答 (1)

2010-02-11 12:06 pm
✔ 最佳答案
(1) 用記事本在桌面建立 REN1.BAS,內容如下:
1000 '程序目的:把 C:\CHK-JPG\*.CHK 更名為 *.JPG
1010 CLS:CLEAR:KEY OFF
1020 DDDN$="REN1"
1030 KEY 8,"SYSTEM"+CHR$(13)
1040 KEY 9,"RENUM 1000"+CHR$(13)
1050 KEY 10,"SAVE"+CHR$(34)+DDDN$+CHR$(34)+",A"+CHR$(13)
1060 'END
1070 OPEN "O",#2,"REN2.BAT"
1080 OPEN "I",#1,"DIR.TXT"
1090 IF EOF(1) THEN SYSTEM
1100 LINE INPUT #1,A$
1110 A$=MID$(A$,1,LEN(A$)-4)
1120 PRINT #2,"REN "+CHR$(34)+"C:\CHK-JPG\"+A$+".CHK"+CHR$(34)+" "+CHR$(34)+A$+".JPG"+CHR$(34)
1130 GOTO 1090
(2) 用記事本在桌面建立 REN1.BAT,內容如下:
:REN1.BAT
@ECHO OFF
CLS
DIR C:\CHK-JPG /B >DIR.TXT
GWBASIC REN1.BAS
EXIT
(3) 把 GWBASIC.EXE 放到桌面
(4) 把 *.CHK 放入「C:\CHK-JPG」資料夾裡面
(5) 左擊 REN1.BAT
(6) 左擊 REN2.BAT


收錄日期: 2021-04-29 00:02:34
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20100211000051KK00077

檢視 Wayback Machine 備份