dsbros:
However, everytime I compile program I have to separately run the batch file (by double clicking on file).
So I was wondering if arduino IDE can be modified little bit such that when I compile the program at the end of successful compilation, it runs the batch file to upload the program.
Hope this explanation helps
That would be easy to do using the Arduino IDE from the command line to compile the program and then using your BAT file to upload it.
I use this Python program to compile and upload my Arduino programs (because I don't use the IDE to edit my code) and the Python program could be amended to do what you want without too much effort.
...R