3 ms·
True, but quoting the path will work: cd "/D"
by paulmooreparks 5y ago
True, but quoting the path will work: cd "/D"
- adtac 5y agoHow? Wouldn't the program's argv see the same string with and without quotes? Or is that just a *nix thing?
- schroeding 5y agocd is a built-in of the shell / cmd, not an application, it does not use argv, AFAIK. It should, as you said, not work for normal applications
- johnny22 5y agonope. I read an article about this when i accidentally broke the arg parsing for wildcards. worked fine in linux, but not on windows :(
- int_19h 5y agoIn Win32, argv is not part of the OS process API. The processes get the entire command line as a string, and have to parse it themselves - or, more commonly, leave it up to the C runtime. But in this case, I don't think it matters.
- DrBazza 5y agoThis is interesting regarding args. https://nullprogram.com/blog/2022/02/18/ https://nullprogram.com/blog/2022/02/18/
- electroly 5y agoNo, it doesn't. Try it and see for yourself. Make sure you're using Command Prompt and not PowerShell.
- bejelentkezni 5y agoI made a typo while checking this, and amusingly while neither cd /D nor cd "/D" work, cd "/D? does.