China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 08:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question about getting values from a loop variable View 798 Replies 2
Original Poster Posted 2009-08-14 00:45 ·  中国 浙江 杭州 杭州世导通讯有限公司互联网数据中心电信节点
初级用户
Credits 36
Posts 16
Joined 2007-03-31 14:14
19-year member
UID 83517
Gender Male
Status Offline
I want to implement the following:
for /f "delims=" %%i in (list.txt) do echo .......
list.txt:
d:\aaa\ccc
d:\sfks\ksj
e:\ttt
What I want is to take the content after the last \ in each line that is read, like this:
ccc d:\aaa\ccc
ksj d:\sfks\ksj
ttt e:\ttt
Asking any expert who knows to help
Floor 2 Posted 2009-08-14 01:26 ·  中国 天津 联通
高级用户
★★★
据说是李先生
Credits 609
Posts 400
Joined 2008-04-23 15:55
18-year member
UID 116706
Gender Male
Status Offline
Floor 3 Posted 2009-08-14 01:31 ·  中国 浙江 杭州 杭州世导通讯有限公司互联网数据中心电信节点
初级用户
Credits 36
Posts 16
Joined 2007-03-31 14:14
19-year member
UID 83517
Gender Male
Status Offline
Hehe, got it working now. Many thanks, expert qinchun36.
Forum Jump: