Page 1 of 1

Powershell Script stuck in Post-Processing

Posted: December 21st, 2013, 1:54 pm
by Ilium
I have a simple powershell script that movies all files/folder from one point to another directory.
I call it through a batch file. These are the contents:
Call.bat
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& 'C:\SB\autoProcessTV\script.ps1'"
exit


script.ps1:
ls "M:\Incoming" | % { move -Path $_.FullName -Destination "M:\Movies"}
exit

Yet, for some unknown reason, even after moving all files/folders successfully, the script keeps running and Sab wont stop.
What's going on?

Re: Powershell Script stuck in Post-Processing

Posted: December 28th, 2013, 6:21 pm
by arastaf
You should only need the following in your batch file to run the script.

Code: Select all

PowerShell -ExecutionPolicy Bypass "C:\SB\autoProcessTV\script.ps1"
Is M:\ a physical drive, or a mapped share?