I'm a newbie, just started trying to write this ^^"
I have a directory of text files, they are data text files from a forum program
The text uses ∥ as the separator
The text content is as follows:
流浪漢∥∥A handy tool for searching Japanese AV actress pictures∥http://image.baidu.jp/∥59.113.162.145∥2007/03/21 13:37∥54188@IMYF.COM∥
I want to use the 2007/03/21 13:37 time part in every text file, which must be on the first line, to change the text filename
As shown below:

But with the way I wrote it, I can't get it done. Which part did I write wrong?
Please give me some guidance, big brothers, many thanks ^^
[ Last edited by leo1984 on 2007-10-31 at 10:53 PM ]
I have a directory of text files, they are data text files from a forum program
The text uses ∥ as the separator
The text content is as follows:
流浪漢∥∥A handy tool for searching Japanese AV actress pictures∥http://image.baidu.jp/∥59.113.162.145∥2007/03/21 13:37∥54188@IMYF.COM∥
I want to use the 2007/03/21 13:37 time part in every text file, which must be on the first line, to change the text filename
As shown below:

But with the way I wrote it, I can't get it done. Which part did I write wrong?
Please give me some guidance, big brothers, many thanks ^^
@echo off
for /f "delims=" %%f in ('dir /on/b "*.txt"') do (
for /f "tokens=1,2,3,4,5,6,7 delims=∥" %%i in (%%f) do echo %%i∥%%j∥%%k∥%%m∥%%o∥%%n∥%%l∥
&setlocal enabledelayedexpansion
for /f "delims=." %%i in ('dir /on/b *.txt') do (
ren "%%i".txt
)
pause[ Last edited by leo1984 on 2007-10-31 at 10:53 PM ]


