title: Batch file to be converted in powershell script
body: <p>I am new on powershell, I want to convert the following batch script into powershell. The reason why I want this conversion is because this script will be run on a server from my task scheduler and due to the fact that the cmd is not working with UNC paths I think that could be a good workaround.
  This script is checking if there are 20 zip files in a folder and in case they are found then starts a python script to unzip them (mandatory)</p>
  
  <pre><code>for /f %%a in ('dir /b  W:\XXX\XXX\*.zip ^| find /c /v ""') do (
     if /i %%a EQU 0 EXIT
     if /i %%a NEQ 20 timeout /t 300 /nobreak
     if /i %%a NEQ 20 Powershell.exe -executionpolicy remotesigned -File W:\XXX\XXX\powershellerrormail.ps1
     if /i %%a NEQ 20 EXIT
     if /i %%a EQU 20 (python W:\XXX\XXX\SSC_Unzipping.py)
  pause)
  EXIT
  
  </code></pre>