Click here to Skip to main content
15,879,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to run the code in console window in run time from code behind

this the code to run console
c:\project>pdftk A=a.pdf B=b.pdf C=c.pdf shuffle A B C output collated.pdf

What I have tried:

i tried with these code Process.Start(Filepath1), Console.WriteLine(Filepath1) it doesn't work.i'm new to console application.please provide some example
Updated 9-Mar-16 0:57am

1 solution

Process.Start("pdftk", "A=a.pdf B=b.pdf C=c.pdf shuffle A B C output collated.pdf")

But...if this is genuinely VB.NET - i.e. a web application - be aware that it will run at teh server, not the client!
Share this answer
SathishRam 9-Mar-16 8:38am    
How to open particular path in command prompt:
from code behind in

in console we do cd C:\Users\sathishr\Desktop\Small
OriginalGriff 9-Mar-16 8:53am    
Basically, don't.
You can do it - just set the WorkingDirectory property of the ProcessStartInfo object for the process - but it will run at the server, not the client - so your user will never see it or be able to tell if it worked, failed, or is waiting for him to press ENTER.
SathishRam 9-Mar-16 23:35pm    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900