-
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?
:confused:
If I confused anyone I'm sorry.. Just cant think of any other way to explain it. Any and all help is appreciated.
-
You could just hide the dos window:
Code:
x = Shell("MyBat.Bat", VbHide)
-
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..
-
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.
-
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.
-
Any of the guru's happen to know if this is possible? Megatron, Matthew... anyone? :rolleyes: