Powershell Script stuck in Post-Processing

Come up with a useful post-processing script? Share it here!
Post Reply
Ilium
Newbie
Newbie
Posts: 2
Joined: December 20th, 2013, 7:56 pm

Powershell Script stuck in Post-Processing

Post 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?
arastaf
Newbie
Newbie
Posts: 13
Joined: November 6th, 2009, 7:29 am

Re: Powershell Script stuck in Post-Processing

Post 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?
Post Reply