|
-
Aug 14th, 2001, 03:59 PM
#1
Thread Starter
Member
How to send text commands to DOS command prompt?
Hi all, I'm trying to be able to send a command on the dos command prompt, is it possible?
I can open the DOS window with API, I know how to do that, but I don't know how to send a command such as "dir" or "ver" or "cd" to the prompt by using API.
Is this process possible? Thanks a lot in advance.
-
Aug 14th, 2001, 07:48 PM
#2
Registered User
I think it is best to create a textfile with the extension bat containing the commands you wish to execute then shell the bat file.
-
Aug 14th, 2001, 10:22 PM
#3
Thread Starter
Member
Yup. That's what I ended up doing for now. But if anyone can find out how to do that, that would be cool. Thanks!
-
Sep 10th, 2001, 04:30 AM
#4
New Member
try this
test="DIR > c:\dir.txt"
Open "c:\dos.bat" For Append As #1
Print #1, test
Close #1
Shell "c:\dos.bat", vbMinimizedNoFocus
check your drive c: and look for dir.txt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|