Poweshell Scripts Exits [Help]

Status
Not open for further replies.

8cores

Active Member
227
2013
36
0
Hello folks, this is my first post and before further ado, I'm gonna tell you guys, I'm a noob at programming languages! With the help of google, I workaround a Powershell script for handbrake automation. Now, the issue is when the source folder is empty the Powershell script exits.

Here's the scenario -

1 - I downloaded someone files - automated via RSS.

2 - They are placed in source folder.

3 - Powershell script works and encoding starts and successfully gets over.

4 - Now, when the encode is completed and in case of new download/file doesn't arrive in the source folder, the script exits.

So, the whole process of automation goes to null.

Opening I:\S\UnpackMonitor...
[16:26:32] CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz
[16:26:32] - Intel microarchitecture Sandy Bridge
[16:26:32] - logical processor count: 12
[16:26:32] OpenCL: library not available
[16:26:32] Intel Quick Sync Video support: no
[16:26:32] hb_scan: path=I:\S\UnpackMonitor, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening I:\S\UnpackMonit
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening I:\S\UnpackMonit
libbluray/bluray.c:2182: nav_get_title_list(I:\S\UnpackMonitor) failed
[16:26:32] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread: Could not open input: Permission denied
libdvdread: Can't open I:\S\UnpackMonitor for reading
libdvdread: Device I:\S\UnpackMonitor inaccessible, CSS authentication not avai
libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:26:32] dvd: not a dvd - trying as a stream/file instead
[16:26:32] hb_stream_open: open I:\S\UnpackMonitor failed
[16:26:32] scan: unrecognized file type
[16:26:32] libhb: scan thread found 0 valid title(s)
No title found.

HandBrake has exited.

Anyone has any suggestions?
 
1 comment
Just my two cents because I struggled for like two days coming from Windows 7 cmd line knowledge into Windows Server Powershell...

The latter appears strict with its syntax. For example, if you have - in your automated script - quoting lines, like handbrake.exe -whatever "whatever" then you have to espace
the quotes with '.

Also, no cmd line tool I have yet to find can be activated like you activate stuff normally under regular windows. I.e. handbrake.exe do stuff

Instead, the tool you use has to be escaped as well. I.e. .\handbrake.exe

Hope this is of some help, mate :)
 
Status
Not open for further replies.
Back
Top