Actually iam new to Teamsite and i dont know much about Datasource framework so could you please tell me how to go about it.
Although you can perhaps use Datasource here, it is IMO a serious overkill for the task.
That's assuming the task ends there. Looks like OP is just writing a shell for something, to understand how things work together. If that's the case, it's the wrong approach. Yes, the simplest of things can be done without Java (e.g. perl would have been a better choice), but if you're going to bother with Java you may as well do it right.. </rant>Aaaanyway, came here to say if you're going to keep using batch files, you should pipe the output to a log file so you can at least get SOME diagnostic messaging.
Whether using Perl might be a better approach here or not, I've tried to provide some help for the Java Inline components that he already has