How to run a command Prompt (MS DOS) instruction from a VB code

accesser2003

Registered User.
Local time
Today, 19:31
Joined
Jun 2, 2007
Messages
124
I want to run the following MS DOS instruction using the VB code:

cd\
copy C:\WorkingArea\TmpPDF.pdf C:\

without showing the command prompt screen?

Is it possible to pass this command using VB code statement?

Thanks
 
I think someone mentioned using shell. Try searching the forum for 'shell command'.
 
What I need is to make stream writing, not manually.
Also to not show the Promt screen
 
Forget DOS. Look into the File System Object. (Add the Microsoft Scripting Runtime reference to your project.) There may just be a method called FileCopy in there.

Not to be rude, Accesser2003, but you've posted an awful lot of questions with no samples of code, no "this is what I tried and this was the result", no nothing. You appear to be asking questions without at all looking for the answers first. If I'm wrong, then I apologize, but I can't find examples of you doing your own research, getting stuck, and asking for help over "the hump" as it were.

Please tell me you're not just spending 30 seconds on something, getting frustrated, and posting a question. You seem to be "highly appreciative" a lot, but it feels like you're not learning much here -- you're getting the fish instead of learning to fish.

I hope you can prove me wrong.
 

Users who are viewing this thread

Back
Top Bottom