Not a direct answer, but in Python you just use the OS module. To be upfront though, if you are building a pipeline tools, you'd be better of using python.
yes I saw so many posts related to python but for MEL there is nothing. Its better to move with python but right now I need a solution for this. Thanks for your suggestion. ::-1: