【发布时间】:2011-05-17 21:37:26
【问题描述】:
我在 DOS 批处理文件中有以下值(例如...):
..\Apple\Jones
..\Banana\Smith
..\Pear\Wilson
我需要从每个值中提取姓氏值(“Jones”、“Smith”、“Wilson”)。我可以使用哪一种技术来始终为我提供这些子字符串值?
【问题讨论】:
-
Windows cmd is not DOS。 DOS没有
%~n0这样的能力
标签: parsing substring extraction batch-file indexof