nykolas
nykolas

Reputation: 194

Arguments in command line shell

I open an .exe file in CMD shell like this: d:/program1.exe text1 text2 text3 text4 text5
How can i use text3 text4 text5 as single parameter? Thanks

Upvotes: 3

Views: 793

Answers (1)

David Heffernan
David Heffernan

Reputation: 612814

You should use quotes around parameters that contain spaces:

d:/program1.exe text1 text2 "text3 text4 text5"

When you invoke you program like this ParamStr(1) is 'text1', ParamStr(2) is 'text2' and ParamStr(3) is 'text3 text4 text5'.

Upvotes: 6

Related Questions