D
David
Hi all,
I am attempting to run...
dir /s c:\ c:\mydir.txt
from within C#. (It works fine from a command prompt)
I am using
..StartInfo.FileName = "dir";
..StartInfo.Arguments = "/s c:\\ c:\\mydir.txt";
but when I attempt to run it, I am crashing out that the file is not found.
It appears that it is the dir command, which I think is not actually a file
but part of the core instructions built into the OS.
How do I run the dir command from within c#?
As a side note, I also attempted FileName = "cmd" and moved the dir to the
Arguments. This didn't fail, it just didn't work.
Thanks for your help.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
I am attempting to run...
dir /s c:\ c:\mydir.txt
from within C#. (It works fine from a command prompt)
I am using
..StartInfo.FileName = "dir";
..StartInfo.Arguments = "/s c:\\ c:\\mydir.txt";
but when I attempt to run it, I am crashing out that the file is not found.
It appears that it is the dir command, which I think is not actually a file
but part of the core instructions built into the OS.
How do I run the dir command from within c#?
As a side note, I also attempted FileName = "cmd" and moved the dir to the
Arguments. This didn't fail, it just didn't work.
Thanks for your help.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available