I want to split the string (having a path) with \\and take last folder name in a variable. Please help.
\\
e.g mypath=D:\\FOLDER1\\FOLDER2\\FOLDER3\\>
try:
for %f in (C:\FOLDER1\FOLDER2\FOLDER3\.) do set myfolder=%~nxf
works also:
for %f in (C:\FOLDER1\FOLDER2\FOLDER3.) do set myfolder=%~nxf