Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change To Specific Folder In DOS/CMD Window

Status
Not open for further replies.

Hackster

Programmer
Mar 28, 2001
173
US
I know who to open up a command window from my app using Shell. Once in DOS, I know how to navigate to whatever folder I want. What I don't know how to do is open up a command window, from my app, that opens in a specified folder.

I would like my customers to click a button in my app and have it open a DOS command window in the folder "c:\AppName" - how would I do that?
 
The easy way is to change directory in VB, then do the Shell:
Code:
ChDir ("c:\test")
Call Shell("cmd", vbNormalFocus)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Duh!!! (Hits self in head with hammer)

Thanks johnwm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top