Parsing a path with FOR command in DOS


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]

Posted by drumsticks on May 02, 2008 at 12:15:41:

Hello,

I'm attempting to parse a path using the FOR command:

SET path=c:\webserver\second\third
FOR /F "usebackq tokens=1,2,3,4 delims=\" %%G IN (%path%) DO (SET drive=%%G&SET webserver=%%H&SET secondDir=%%I&SET thirdDir=%%J)

However, this is not working. Would you happen to know what I am doing incorrectly?

Thanks for any help or direction!


Follow Ups:



Post a Followup (use TAB key to move between boxes - NOT ENTER or RETURN)

Name:
E-Mail:

Subject:

Type your comments in the box below and SUBMIT:


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]