Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass data by command line

Status
Not open for further replies.

shlomos

Programmer
Sep 23, 2002
25
US
Can I pass data, say, a string, to an exe program by a command line? And if so (I hope), how can I retrieve it from inside the program?

For example, suppose the program is MyProgram.exe. I would like to start it by a command line like

MyProgram.exe "abc"

Now, I don't know how to retrieve this "abc" programmatically.

Thank you for your help.
 
Command$ returns the command parameters ... in your case it would have the value "abc".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top