?
Solved

Access data in command prompt in VB.net

Posted on 2006-03-30
3
Medium Priority
?
154 Views
Last Modified: 2010-04-23
How can we access the data from command prompt in VB.net and put the data in an array?
Say, we execute 'dir', I would like the result in an array in VB.net
0
Comment
Question by:n4narik
  • 2
3 Comments
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 750 total points
ID: 16338573
Dim CommandLine() As String = Environment.GetCommandLineArgs()

The first element in the array is the name and path of the executing file all other elements ar the argument list
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16339759
See iboutchkines answer here:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21780733.html

You could instead use the Split() command to break the results out into an array.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16360613
Wow...I interpreted that one bass ackwards...   ;)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question