我在 DOS 批处理文件中有以下值(例如...):
..\Apple\Jones
..\Banana\Smith
..\Pear\Wilson
我需要从每个值中提取姓氏值(“Jones”、“Smith”、“Wilson”)。我可以使用哪种技术来始终为我提供这些子字符串值?
最佳答案
根据这个话题:What is the best way to do a substring in a batch file?
我建议你使用
%~n0
关于parsing - DOS 批处理 : get last folder from relative path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4314478/