added batch script and assimilated the behaviour of the shell script
Merge branch 'bat'