TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Akash Dani
NA
87
25.4k
Batch file is not running properly
Jul 3 2019 7:12 AM
I have created batch file.When I run manually it working fine.But when I run using c# codes in visual studio its not working any idea about this?
I have tried all the methods
This is my code
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.RedirectStandardOutput = false;
p.StartInfo.FileName = "\\\\172.16.10.111\\StarRECON2\\StarRECON\\Files\\Extraction\\Files" + "TESTDEL.bat";
----BatchFilePathp.StartInfo.UseShellExecute = false;
p.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
p.StartInfo.RedirectStandardError = true;
Write("BatchFile: Start() Execution Started");
p.Start();
p.WaitForExit();
Write("BatchFile: WaitForExit() Execution Ended");
p.Dispose();
My Batch File Code:
set _p= %-p%
sdelete _p 7 \172.16.10.111\StarRECON2\StarRecon\Files\Extraction\Files\UBETSW04062018.CSV
Reply
Answers (
8
)
Controls of textbox
Get CreateDate and UpdateDate in mvc consuming a webapi