Command line parameters where the value has a space in it

Got a problem you cannot solve? Try here.
Post Reply
agrogers
Posts: 21
Joined: Fri Jul 04, 2008 12:09 am
Location: Australia

Command line parameters where the value has a space in it

Post by agrogers »

I want to pass a folder path in via a command line parameter. This works fine as long as the path doesnt have a space character in it (since the space character is used to separate parameters). How do i pass in a value with a space in it? Should placing the value in quotes work?

Thanks
Andrew
BobSchaefer
Posts: 47
Joined: Thu Sep 30, 2010 12:12 pm

Re: Command line parameters where the value has a space in i

Post by BobSchaefer »

I haven't tried it specifically, but this is the normal way of passing in values on the command line with spaces in them, namely using the double quotes character around the entire parameter.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Command line parameters where the value has a space in i

Post by giaviv »

Dear agrogers,

Correct - quotes are the right way to go. Otherwise, your input is separated by spaces.

Thanks
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply