Access data in command prompt in VB.net

Posted on 2006-03-30
Medium Priority
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
Question by:n4narik
  • 2
LVL 64

Accepted Solution

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
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16339759
See iboutchkines answer here:

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

Expert Comment

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

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