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).
 

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