The method above is not very flexible. For example, the number of lines in the output of the dir command often changes (varies with different folders), only the first and last few lines are unchanged. If you want to process all lines except those few unchanged ones, the above method is not suitable.
Attachment:
C:\>dir /a-d /-c
Volume in drive C is not labeled.
Volume Serial Number is 98C6-B5CC
Directory of C:\
2006-09-22 11:32 0 AUTOEXEC.BAT
2006-09-22 11:25 211 boot.ini
2004-08-17 20:00 322730 bootfont.bin
2006-09-22 11:32 0 CONFIG.SYS
2006-08-12 19:30 0 dfinstall.log
2007-09-17 08:17 266919936 hiberfil.sys
2006-09-22 11:32 0 IO.SYS
2006-09-22 11:32 0 MSDOS.SYS
2004-08-17 20:00 47564 NTDETECT.COM
2004-02-17 14:49 285344 ntldr
2007-09-17 08:28 206 ok.txt
2007-09-17 08:17 402653184 pagefile.sys
2007-09-17 08:18 8871936 Persi0.sys
2006-09-24 11:19 27214 _NavCClt.Log
14 File(s) 679128325 bytes
0 Dir(s) 11131838464 bytes free
At this time, if you want to process all lines except the first 5 lines and the last 2 lines, the above method won't work. I wonder if any expert can provide a better method.
[ Last edited by renrenrenshk on 2007-9-17 at 09:15 AM ]