Diagnostics process - dos command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following process won't work if I use "move" in the FileName. However, if I replace it with @"c:\winnt\system32\xcopy.exe ", then it works fine. Is there anything I missed. It is running on Windows 2000 server (not Advanced Server)

Process d
d = new Process()
d.EnableRaisingEvents = false
d.StartInfo.FileName = "move"
d.StartInfo.Arguments = @"c:\*.jpg c:\image\"
d.Start()
d.Close()
d.Dispose();
 
Try setting UseShellExecute (?) to true.
-mike
MVP

RSAGS said:
The following process won't work if I use "move" in the FileName.
However, if I replace it with @"c:\winnt\system32\xcopy.exe ", then it works
fine. Is there anything I missed. It is running on Windows 2000 server
(not Advanced Server).
 
RSAGS,

I believe that move is something that is interpreted by the command
line, not an actual process. So, to get it to work, your executable would
have to be CMD.EXE and then pass "MOVE" as the first parameter.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

RSAGS said:
The following process won't work if I use "move" in the FileName.
However, if I replace it with @"c:\winnt\system32\xcopy.exe ", then it works
fine. Is there anything I missed. It is running on Windows 2000 server
(not Advanced Server).
 
Back
Top