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
*-----------------------*
 
Back
Top