- @echo off&setlocal enabaledelayedexpansion
- path E:\GameRecord\hucuibai;%path%
- for /r E:\GameRecord %%i in (*.txt) do (
- for /f "tokens=7 delims=\" %%a in ("%%i") do (set str=%%a&echo !str!)
- )
- pause
复制代码 目录结构是
E:\GameRecord\hucuibai\Thu\G\gamerecord\gamerecord-chn1030\20110101\onlinetimerecord20110101.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\gamerecord-chn1030\20110101\PlayerLogonLog20110101.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\gamerecord-chn1030\20110101\PlayerPropertyLog20110101.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\gamerecord-chn1030\20110101\serverinfo20110101.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\gamerecord-chn1030\20110101\starLevelInfoLog20110101.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\rxkl-gamerecord-1020\20110121\itemrecord20110121.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\rxkl-gamerecord-1020\20110121\onlinetimerecord20110121.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\rxkl-gamerecord-1020\20110121\PlayerLogonLog20110121.txt
E:\GameRecord\hucuibai\Thu\G\gamerecord\rxkl-gamerecord-1020\20110121\serverinfo20110121.txt
错误提示:
对 SETLOCAL 命令来说参数是无效的。
!str!
!str!
!str!
!str!
!str!
!str!
!str!
!str!
!str!
!str!
!str!
!str! |