C
catcatdogdog
Unregistered / Unconfirmed
GUEST, unregistred user!
我想从Dir的输出把文件名提取出来放到一个列表里。仅仅文件名和扩展名,不要时间、大小。<br>用子串处理好像有难度,因为不同操作系统下文件名在一行中的位置还不一样。在/w参数下一行显示的多少也不一样。<br><br>Dir以后大概是这个样子:<br><br> F:/ 的目录<br><br>2004-12-18 15:13 15,474,760 angz.exe<br>2005-01-18 07:34 1,111,072 assist4.exe<br>2005-01-16 22:18 5,276,659 ayda601.exe<br>2005-01-31 16:56 542,976 ChinaClawbd.exe<br>2005-02-19 12:01 504,320 daemon347.exe<br>2005-02-19 16:42 9,411,439 Delphi7.1 Update.exe<br>2005-02-19 12:38 685,010,944 delphi7.iso<br>2003-05-14 16:00 297,528 directx90Awebsetup.exe<br>2005-04-30 13:04 <DIR> Driver<br>2005-04-01 10:23 <DIR> EditPlus.v2.12<br>2005-01-31 11:13 1,668,159 fg165.exe<br>2003-12-17 08:40 683,132 flashplayer7installer.exe<br>2005-01-24 06:23 4,648,151 IPguardSCN.zip<br>2005-01-18 04:26 54,450,037 j2sdk-1_4_2_07-windows-i586-p.exe<br>2005-02-19 13:47 5,556,616 MDAC_TYP.EXE<br>2005-02-19 11:58 <DIR> nav<br>2005-01-05 04:39 242,919 nettools.rar<br>2004-09-07 16:57 21,996,877 NPF_Retail.EXE<br>2005-02-19 12:13 682,854,400 OFFICE2K3_SC.ISO<br>2005-01-31 11:09 <DIR> RAR<br>2003-07-20 11:46 77,172 Reset5.02.rar<br>2005-02-19 12:26 710,950,912 SQL2KCN.iso<br>2004-07-18 13:46 32,772 winmd5.exe<br>2005-02-04 07:59 <DIR> WUTemp<br>2005-02-04 09:42 <DIR> 制作帮助文件<br> 19 个文件 2,200,790,845 字节<br> 6 个目录 22,281,732,096 可用字节<br><br>加上/w参数后得到的是:<br><br> F:/ 的目录<br><br>angz.exe assist4.exe<br>ayda601.exe ChinaClawbd.exe<br>daemon347.exe Delphi7.1 Update.exe<br>delphi7.iso directx90Awebsetup.exe<br>[Driver] [EditPlus.v2.12]<br>fg165.exe flashplayer7installer.exe<br>IPguardSCN.zip j2sdk-1_4_2_07-windows-i586-p.exe<br>MDAC_TYP.EXE [nav]<br>nettools.rar NPF_Retail.EXE<br>OFFICE2K3_SC.ISO [RAR]<br>Reset5.02.rar SQL2KCN.iso<br>winmd5.exe [WUTemp]<br>[制作帮助文件] <br> 19 个文件 2,200,790,845 字节<br> 6 个目录 22,281,732,096 可用字节