Call a Windows shell command from pl/pgsql
You cannot do it in plpgsql. This language is "secure" language - that means, so nobody can access any system sources - IO, system functions, ..
When you need to use system sources, then you should to use some "untrusted" language like PLPerlu or PLPythonu. These languages are unsecure - without limited access to system.