Results 1 to 3 of 3

Thread: getting output from MSDOS

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    UK, Bedfordshire
    Posts
    49

    Question

    could some one tell me how to get the output from a msdos command? for example "dir" into a text box?

    thanx
    Thanx, for your reply(s)

    Zhang Tian Hao
    Visual Studio Enterprise 6.0 SP 4
    ZhangTianHao@talk21.com

  2. #2
    Guest
    You could output the command results to a file first:

    Code:
    'list all files in C:\ and write to a file
    Shell "command.com /c dir /b c:\ > C:\cListing.txt", vbHide
    
    'then open it:
    Open "C:\cListing.txt" For Input As #1 
    Text1.text = Input$(LOF(1), 1) 
    Close #1

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    UK, Bedfordshire
    Posts
    49

    Thanx. I'll try that, but i guess i may encounter problems when i am running another DOS app that involves input from the user such as:

    dir /p

    Thanx, for your reply(s)

    Zhang Tian Hao
    Visual Studio Enterprise 6.0 SP 4
    ZhangTianHao@talk21.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width