Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pass command line variable with space

Hi all,

I'm trying to pass a datetime as a variable value through the command line so it looks like this:

C:\progra~1\qlikview\qv.exe /r /vMyDate=2009-01-01 14:35:23 MyQWV.qwv

but I'm getting an error saying that 14:35:23 is an invalid switch. How can I pass a variable value that contains spaces and, while we're at it, if I'm passing multiple variable values do I need to use the /v switch for each one, or is there a delimiter I can use to separate them?

Thanks,

-Mark

4 Replies
vgutkovsky
Master II
Master II

Mark,

I'm assuming everything is in correct syntax. You just need to enclose each part in quotes if it contains spaces or other special characters. So it would look like this:

"C:\Program Files\Qlikview\Qv.exe" /r /vMyDate=2009-01-01 "14:35:23 MyQWV.qwv"


Regarding your second question, I think you need a separate switch for every variable.

Regards,

Not applicable
Author

Sorry, I should have been clearer: The variable value I'm trying to pass is "2009-01-01 14:35:23" and file name is MyQWV.exe

I've tried

"C:\Program Files\Qlikview\Qv.exe" /r /v"MyDate=2009-01-01 14:35:23" MyQWV.qwv

But that doesn't work. Any other thoughts?

-Mark
vgutkovsky
Master II
Master II

Try this:

"C:\Program Files\Qlikview\Qv.exe" /r /vMyDate="2009-01-01 14:35:23" MyQWV.qwv


Not applicable
Author

"C:\Program Files\Qlikview\Qv.exe" /r /vMyDate="2009-01-01 14:35:23" MyQWV.qwv

"C:\Program Files\Qlikview\Qv.exe" /r "/vMyDate=2009-01-01 14:35:23" MyQWV.qwv