Using batch commands how do I get the folder path/directory from a string?
For example, if I have the string "C:\user\blah\abc.txt" how do I split the string so I can just get the folder part, ie, "C:\user\blah\"?
If pass the string "C:\user\blah\abc.txt" in the command line of a batch file, how do I split that string into just the folder part?
REM // Grab "C:\user\blah\abc.txt" from the command line
SET path="%*"
REM // The following doesn't successfully capture the "C:\user\blah\" part
SET justFolder=%path:~dp1%