I know how to do in Unix script.
but I don't know how to do it in Windows(NT) DOS script.
string is "c:\a\b\c\d\file"
How can I write the script to return "file" only from above string?
[Note: the above string is just an example, it stands for any path with any
length.]
Thanks a lot!
c*****t 发帖数: 1879
2
echo a\b\c|sed 's/.*\\\\//g'
any
【在 M*****t 的大作中提到】 : I know how to do in Unix script. : but I don't know how to do it in Windows(NT) DOS script. : string is "c:\a\b\c\d\file" : How can I write the script to return "file" only from above string? : [Note: the above string is just an example, it stands for any path with any : length.] : Thanks a lot!