my2001 Posted October 29, 2004 Share Posted October 29, 2004 FOR %%d in (xxx yyy zzz) DO ( echo %%d)That's my basic structure which, of course, works fine. But unfortunately one of my arguments (i.e. xxx, yyy and zzz) contains spaces, e.g. "x xx" and FOR-command recognizes this as two separate argruments then.Isn't there a possibility except /F switch to tell FOR to that one argument contains spaces? I tried to use quotes like 'xxx' etc. but this didn't help.I can't take the spaces out of the arguments b/c my arguments represent registry keys which woulnd't be valid any longer w/o the spaces. Link to comment Share on other sites More sharing options...
gunsmokingman Posted October 30, 2004 Share Posted October 30, 2004 FOR %%d in (xxx yyy zzz) DO ( echo %%d)FOR %%d in (" I think these are needed xxx yyy zzz (" I think these are needed ) DO ( echo %%d) FOR %%d in ("xxx yyy zzz") DO ( echo %%d I am not sure but this may work Link to comment Share on other sites More sharing options...
jdoe Posted October 31, 2004 Share Posted October 31, 2004 @my2001I'm not sure to understand what you want but if I understand this code can solve the problemFOR %%D IN ("XXX" "YYY" "ZZZ") DO ECHO %%~DHoping this help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now