system commands

  • Thread starter Thread starter mamin
  • Start date Start date
There is a number of classes with static methods for common files and
directory management tasks. Take a look at the File and Directory classes.
--
Kai Brinkmann [MSFT]

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
 
If you're wanting to copy files, use the abovementioned File
object...ie File.Copy().
If you want to run system commands at a command prompt...

using System.Threading;
....
Process p = new Process();
p.StartInfo.WorkingDirectory = "c:\\";
p.StartInfo.Arguments = @"/K dir *.*";
p.StartInfo.FileName = @"cmd.exe";
p.Start();


...for instance, will open a command window, execute the command line
listing the files, and remain visible so you can see the results.

This is admittedly not a preferred method.
Hope this helps,
Joe

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
I am sure you are talking about System.Diagnostics.Process and NOT
System.Treading
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top