Execute string parameter

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

I have a string in the format:
Export.exe %1 %2

I will exexute this string by Process.Start();

However, before calling the Start I need to substitute the %1 and %2 with
the source file name and destination file name, how do I substitute that?
 
Alan said:
I have a string in the format:
Export.exe %1 %2

I will exexute this string by Process.Start();

However, before calling the Start I need to substitute the %1 and %2 with
the source file name and destination file name, how do I substitute that?

Process.Start(s.Replace("%1", "Foo").Replace("%2", "Bar"));

or something similar.

Arne
 

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

Similar Threads


Back
Top