I am having difficulties trying to extract the last folder name from registry strings that I retrieve with the REG command.
The current code I have so far is:
for /F "skip=2 tokens=3 delims=, " %%i in ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop') do (
for /F "delims=\" %%i in ("%Personal%") do (
The above code returns the full string that I get from the registry and I cant seem to get it working, would appreciate any help.
Thanks in advance