Link to home
Start Free TrialLog in
Avatar of pipe
pipe

asked on

How to call system commands

hello/

how do i call system commands such as 'dir', 'cd' etc

thanks / p
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sohilm
sohilm

What are you trying to accomplish? Are you trying to modify files, or display files on the screen?
gregasm isnt

Process.Start("cmd.exe", "/C dir")
and
Shell("cmd.exe","/C dir")

nearly the same thing ? :)
in fact shell calls Process.Start :P
shell("explorer.exe ""c:\my music\""")

something like that. right on.
Avatar of pipe

ASKER

ill look into this tonight. i am making my own command prompt and i was just gonna issue the commands (like suggested above) and return the results to my custom command prompt.
well I suggest using the system.io.directoryinfo and system.io.fileinfo to get info and do some basic tasks. This way you have more control on what to show on the screen.