Get last string after delimiter FOR /F
Posted: 21 Dec 2011 13:24
Hello,
I want to know if it's possible to get the last string after the specified delimiter in a FOR /F loop.
For example, say I have the directoryI want to extract only "Wallpaper" from the string using a FOR /F loop. Or if I haveI want to extract only "Example Folder 2" from the string.
The only problem is I don't know how to set the TOKENS parameter equal to an ever-changing number. Any ideas?
Thanks for the help!
I want to know if it's possible to get the last string after the specified delimiter in a FOR /F loop.
For example, say I have the directory
Code: Select all
C:\WINDOWS\Web\Wallpaper
Code: Select all
C:\Users\[username]\Desktop\Example Folder\Example Folder 2
The only problem is I don't know how to set the TOKENS parameter equal to an ever-changing number. Any ideas?
Thanks for the help!