|
-
Oct 12th, 2000, 10:45 AM
#1
Thread Starter
Addicted Member
Is there anyway that I can load a *.bat file into my project? Ok, here's what I've got. My program creates a batch file, and executes it. Instead of having the .bat file open outside of my program, I would like it to acctually open inside my program. If possible I would like to just have my program do what the batch file does. So I guess this is question #2. Is there anyway that I can have my program execute DOS commands but not open a dos window?

If I confused anyone I'm sorry.. Just cant think of any other way to explain it. Any and all help is appreciated.
-
Oct 12th, 2000, 10:48 AM
#2
Frenzied Member
You could just hide the dos window:
Code:
x = Shell("MyBat.Bat", VbHide)
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 12th, 2000, 10:51 AM
#3
Thread Starter
Addicted Member
Yes, I know. That is what I'm currently doing. The main reason I want to be able to do this inside my app is so I can add a progress bar, ect.. so the user will know how long is left ect..
-
Oct 12th, 2000, 01:33 PM
#4
It depends what the batch file does. Tell us what the batch file does and maybe you can code that into your program without DOS.
-
Oct 12th, 2000, 01:48 PM
#5
Thread Starter
Addicted Member
My program is similar to like Winrar. It takes files that have been split up like that and puts them back together.
this is the code that I currently have. And it works. I just want to be able to do the same thing inside my program, without having to use the batch files.
Code:
Open App.Path & "\MergeFiles.bat" For Output As #1
Print #1, "@echo off"
For x = 0 To lstFiles.ListCount - 1
If x = 0 Then Print #1, "Copy /b " & Chr(34) & lstFiles.List(0) & Chr(34) & " " & Chr(34) & MergeOutput.FileName & Chr(34): x = 1
If lstFiles.ListCount = 1 Then GoTo endit
Print #1, "Copy /b " & Chr(34) & MergeOutput.FileName & Chr(34) & "+" & Chr(34) & lstFiles.List(x) & Chr(34) & " " & Chr(34) & MergeOutput.FileName & Chr(34)
Next x
Print #1, "Merged Successfully!"
Print #1, "Cls"
Print #1, "Exit"
Close #1
Shell App.Path & "\MergeFiles.bat", vbMinimizedNoFocus
Any ideas? any help is appreciated.
-
Oct 12th, 2000, 03:39 PM
#6
Thread Starter
Addicted Member
Any of the guru's happen to know if this is possible? Megatron, Matthew... anyone?
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
|