sony1464
asked on
parsing the command line arguments
How do you read values passed as a command line argument in vb6 applications. the application would be called like shown below. I would like to get the three arguments that are passed with the exe. How do i do that vb 6. thanks in advance.
C:\parser.exe JU1991020005 940604707218.txt 940604707218.idx
C:\parser.exe JU1991020005 940604707218.txt 940604707218.idx
I think you can get by using the command function.
sub frmmain_load()
frmmain.text1 = command
end sub
sub frmmain_load()
frmmain.text1 = command
end sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i tried hes's example and it worked great .... now how do i get the filename without the extension from the second argument and save it in the application diresctory as filaname.doc...i really appreciate such a quick reponse....
for the above example i want a file called 940604707218.doc to be created in the application directory.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Query the Command$ variable in your VB code.
In the above example, it will contain "JU1991020005 940604707218.txt 940604707218.idx".
BFN,
fp.