Access data in command prompt in

Posted on 2006-03-30
Last Modified: 2010-04-23
How can we access the data from command prompt in and put the data in an array?
Say, we execute 'dir', I would like the result in an array in
Question by:n4narik
    LVL 62

    Accepted Solution

    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 85

    Expert Comment

    by:Mike Tomlinson
    See iboutchkines answer here:

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

    Expert Comment

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

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now