Click to See Complete Forum and Search --> : running bat file from windows application


drch7
February 19th, 2007, 01:04 AM
i want to access bat file from the windows application..
i shall be passing multiple arguments from the environment...
basically i shall be running a code review tool and then i want to store the output from the console in an intermediate file for further processing...
can u suggest me ways to do it ?
i tried using the system "process" class and then creating a process and running it from environment... i had given the command ">a.txt" in the arguments list to create the text file of the output.. but a blank file of the name a.txt was created. and on console the same command runs without error and proper text file is created. can u help me out ? or suggest other methods to save the output from console to process it ( mayb as a string or sumthin )
thanks ppl

Shuja Ali
February 19th, 2007, 01:12 AM
Welcome to the Forum :wave:

Basically when you run a process using the process class it will run in the default directory that you are currently in. In your case it will be the bin folder of your project. Make sure that you change the current or working folder before you start the Batch file.