Geeks With Blogs

The Wrecking Bawl Destructuring query language, one keyword at a time.

I discovered something weird with .Net console apps.  Say I have an app called testapp and want to run it from a command line like this:

C:\>testapp /s Server /f "C:\testfolder\testfile\" >output.txt

That won't work the way you might expect it to.  The framework doesn't treat \" (backslash followed by a double quote) the way it should (in my opinion) and so the last argument is "C:\testfolder\testfile\" >output.txt

I just throw up a message in my app telling the user not to end the path with \", for lack of a better solution.  Thanks to Jon Galloway for this:;title=Command+Line+Confusion

Posted on Friday, December 8, 2006 5:00 PM all tech stuff , general .Net stuff | Back to top

Comments on this post: .Net console apps and \"

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Alex Bransky | Powered by: