C# question

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

C# question

Post by Andrew_b »

Im working on programming with some use from the command prompt...

I want my program to tell command prompt to move something somewhere and the code in cmd uses "" for the paths...and in C# if i try to type "" for the coding, it thinks im stopping my text.

Code: Select all

System.Diagnostics.Process.Start("cmd.exe", @"/c MD "path" "path to move"");
thats my code
User avatar
Anthony




Translator Connoisseur New Age ONI

Posts: 1001
Joined: Thu Jul 06, 2006 10:19 pm
Location: Whittier, CA
Contact:

Post by Anthony »

to use a " just simply put a \ before it so it should look like this

\"
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

thanks!
mrbuckaroo





Posts: 1
Joined: Wed Apr 02, 2008 10:14 pm

Post by mrbuckaroo »

In case you ever need to google for the concept it is called an "escape character".
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

I'll keep that in mind. Thanks!
Post Reply