This is a migrated thread and some comments may be shown as answers.

run a BATCH file after upload event server-side

1 Answer 47 Views
Upload
This is a migrated thread and some comments may be shown as answers.
zanekevin
Top achievements
Rank 1
zanekevin asked on 08 Mar 2011, 10:42 PM

Has anyone been able to call or run a BAT file on the server-side?
Maybe with in the  SaveChunkData, If  this.IsFinalFileRequest()   ?

I need to Upload a CSV and on the IsFinalFileRequest to start a BAT file that will load my CSV using ORACLE SQL LOADER.
Or I can just call SQLLDR.exe from the finalEvent and pass the params (filename) to the EXE.

I tried this sample below and seems not to work in my ASHX Handler.

       ProcessStartInfo startInfo = new ProcessStartInfo();
       startInfo.FileName = "SQLLoader.bat";   
       startInfo.UseShellExecute = true;
       startInfo.WorkingDirectory = @"C:\";

       Process.Start(startInfo);

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 11 Mar 2011, 10:32 AM
Hello zanekevin,

There should be no problem running a bat file or starting a process from the RadUploadHandler. I tried this on my end and it was working correctly. Do you get any exceptions when starting the process?
Regards,
Alex Fidanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Upload
Asked by
zanekevin
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or