Life sucks when you are asked to make your script run in Windows, that you have written for Linux and that uses lots of Unix or Linux specific system commands :(
But there is a nice tool name UnxUtil that you can install on your windows and run Unix / Linux commands in the command line. UnxUtil will speed up your development by saving hours.
You can download it from here. After download, just extract it in a directory and add the PATH in your ENVIRONMENT VARIABLE (PATH) (Start -> Settings -> Control Panel -> System -> Advanced -> Environment Variables).
Thats all!