By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

pass variable with double quote for execution in command prompt

P: 1
strCmdLine = " " + " -o restore -url " + sSitePath + "/sites/" + sToplevelSiteName + " -filename " + sFileName+ " -overwrite ";

process1 = System.Diagnostics.Process.Start(Application.Start upPath + @"\" + "STSADM.EXE", strCmdLine);
process1.WaitForExit();

process1.Close();



I want double qoute around sfilename Please tell me how to pass variable containing ' " " (double qoute)
Jul 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: 4
strCmdLine = " " + " -o restore -url " + sSitePath + "/sites/" + sToplevelSiteName + " -filename " + sFileName+ " -overwrite ";

process1 = System.Diagnostics.Process.Start(Application.Start upPath + @"\" + "STSADM.EXE", strCmdLine);
process1.WaitForExit();

process1.Close();



I want double qoute around sfilename Please tell me how to pass variable containing ' " " (double qoute)
escape the double quote: "\"study .NET first\"" will translate into: "study .NET first" ;)
Jul 5 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.