Profile Picture

Command line parameter /SettingsFolder to use quotes around folder

Posted By pdcruze 6 Years Ago

Command line parameter /SettingsFolder to use quotes around folder

Message
Posted Wednesday November 30 2011
I'm using Build 38 and was pleasantly surprised to discover the new /SettingsFolder: command line parameter. Its a great addition - thanks very much.

However, I'm unable to specify a folder that has spaces in it. If I try something like this:

/SettingsFolder:C:\Temp\RightEdge 2010.1\

then RightEdge uses the folder "C:\Temp\RightEdge\" - ie, everything up to the first space.

If I try something like this:

/SettingsFolder:"C:\Temp\RightEdge 2010.1\"

then an exception is thrown complaining about illegal characters in the path (the quotes).

For consistency, could it be modified to accept quotes around the folder? This would make it more consistent with the /W:, /P: and /O: command line parameters and allow using folders containing spaces.

Thanks.


System.TypeInitializationException was unhandled
Message=The type initializer for 'RightEdge.xf266856f631ec016' threw an exception.
Source=RightEdge
TypeName=RightEdge.xf266856f631ec016
StackTrace:
at RightEdge.xf266856f631ec016.ShowErrorSpecialDialog(Exception ex)
at RightEdge.AppMain.Main(String[] args)
InnerException: System.ArgumentException
Message=Illegal characters in path.
Source=mscorlib
StackTrace:
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at RightEdge.xf266856f631ec016..cctor()
InnerException:
Posted Thursday December 01 2011
The quotes around the settings folder on the command line should work. At least, I tested it and it worked on my machine. Smile

Is it possible that somewhere along the way the quotes were converted to “smart quotes”?

Daniel
Posted Thursday December 01 2011
Thanks for that Daniel. I tried a few more combinations and managed to get it to work. Yay. This works:

/SettingsFolder:"C:\Temp\RightEdge 2010.1"

but this fails with the System.TypeInitializationException

/SettingsFolder:"C:\Temp\RightEdge 2010.1\"

I thought it was the quotes that was causing the exception but it seems to be the trailing slash.
Posted Friday December 02 2011
I'm glad you got it working. I took a look at what is happening, and it looks like the trailing backslash is escaping the last quotation mark so the quotation mark is included in the parameter instead of marking the end of it. So the path RightEdge sees has a quotation mark at the end and hence the error. That part of the command line parameter parsing is done by .NET, so I don't think we have any control over it.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems