## POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

1.
If notepad.exe is called, then we know that works, so the next step is to do the same with C:/Windows/System32/cmd.exe /c C:/script.bat.

2.
Just write a script that does something like this:

Code: Select all

DATE /T > C:\date.txt
If the CMD script is called, then C:\date.txt will be created.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok so this is what I put in the scripter for my script.

var command = ['C:/Windows/System32/cmd.exe /c C:/script.bat']
log(command)
log(callSync(command))

I also created a BAT file with DATE /T > C:\date.txt inside of it and saved it to C for it to be called.

When I did a test run in the scripter in JDownloader2 it came back with an error.

Does the error mean it is not finding the cmd program?
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Well, I don't use Windows. Where's cmd.exe on your system?
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

LOL, sorry but unfortunately it's the machine I am doing this on right now. I prefer linux myself though.

It is here :

Code: Select all

C:\Users\Chris Chester\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools

Does it matter if I use single quotes vs double quotes when doing the script?

This is the script now

Code: Select all

var command = ['C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe /c C:/script.bat']
log(command)
log(callSync(command))
I will try that path and see if it works

Code: Select all

var command = ["C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe /c C:/script.bat"]
log(command)
log(callSync(command))

Same results either way.

This seems very simple but I am not sure why it just is not working. I do really appreciate your help on this.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

I also tried alone to try and launch the command window by itself like notepad with this:

Code: Select all

var command = ["C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe"]
log(command)
log(callSync(command))

Still got errors

java.io.IOException: Cannot run program "C:/Users/Chris Chester/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/System Tools/cmd.exe": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212) at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:254) at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148) at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 22 more (#3) chest069 Posts: 24 Joined: 01 Jan 2014, 11:09 ### Re: [JDownloader] Setup for Windows, Linux and Mac OS X I did go back and try just launching cmd.exe by itself in the script but got the same results even though I verified that is where cmd.exe is: Code: Select all var command = ['C:\Windows\System32'] log(command) log(callSync(command)) so still no luck Code: Select all net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3 java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196) at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:247) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120) at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531) at script(:3) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
(#3)
at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119) at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115) at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212) at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:254) at org.jdownloader.extensions.eventscripter.ScriptThread.executeScipt(ScriptThread.java:148) at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:128) Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: Line 3 java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201) at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196) at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.callSync(ScriptEnvironment.java:247) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120) at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531) at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798) at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411) at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:119)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
... 12 more
Caused by: java.io.IOException: Cannot run program "C:Windows System32": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:215)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:201)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:196)
... 17 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

If I run the command from the command line I get:

Code: Select all

C:\>jdownloader-postprocess.cmd
The syntax of the command is incorrect.
C:\><!DOCTYPE html>
I don't know if it is the correct way to try it.
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

1.
Did you just "Save as..." a web page and then run it as CMD script?

Here's what a CMD script looks like:
https://raw.githubusercontent.com/fileb ... rocess.cmd

Here's what a HTML web page looks like:
https://raw.githubusercontent.com/fileb ... index.html

2.
Now, the first step is to actually have a working cmd script, but then it'll still probably not work right away, because Windows, and then we're back to where we started.

I'm not sure if this tutorial is for you. Looks like you're gonna struggle hard every step of the way.

3.
Here's some general debugging tips. (a) You can't execute a folder. (b) Read the error message. Doesn't this look strange? No \ here? That's because in "..." the \ character almost always has special meaning, meaning that you can't use it literally. (not your fault, Windows engineers made really really bad decisions back in the 80ies, and their mistakes are still coming back to haunt us all)

Code: Select all

Cannot run program "C:Windows System32"
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

LOL, apparently that is what I did, now that I look at both of them. I assumed what was there was what i needed so yeah I copied it. Oh well. Sorry for the frustration on my user error.

I saved the file that you just posted.

I will test things but running the cmd on it's own to see if it work then move back to the scripter.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok, well I tried what you suggested and I get the following when running the command file you created from the command line on it's own.

Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Mon Jan 21 10:50:59 EST 2019]
Parameter: skipExtract = y
Illegal usage: no input
Failure (°_°)

I also tried the script again just to see if would at least launch it even if it failed but I get nothing. I can't seem to find the correct log either.

log(command)
log(callSync(command))

I will keep trying and thanks for all the help. Sorry about the mistakes.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok, well I tried what you suggested and I get the following when running the command file you created from the command line on it's own.

Code: Select all

C:\>jdownloader-postprocess.cmd
Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Mon Jan 21 10:50:59 EST 2019]
Parameter: skipExtract = y
Illegal usage: no input
Failure (°_°)
I also tried the script again just to see if would at least launch it even if it failed but I get nothing. I can't seem to find the correct log either.

Code: Select all

var command = ['/jdownloader-postprocess.cmd']
log(command)
log(callSync(command))
I will keep trying and thanks for all the help. Sorry about the mistakes.
Gruff10
Posts: 2
Joined: 21 Jan 2019, 21:41

Hi,

NOOB here

Using

Code: Select all

{plex.derive{" [$vf.$vc.$ac]"}} I find that the TV series 24 (Twenty Four) fails because the fullstops in its episode titles are being replaced (see output below). https://ibb.co/87vTcrF How can I get around this? Thanks. rednoah The Source Posts: 19144 Joined: 16 Nov 2011, 08:59 Location: Taipei Contact: ### Re: Plex Naming Schemes Yes, the {plex} format does indeed strip trailing "." characters from the Plex path. In your case, that's unnecessary, but the {plex} binding can't know that. e.g. Code: Select all $ filebot -list --q 24 --format {plex} --filter "s == 1 && e <= 3"
TV Shows/24/Season 01/24 - S01E01 - 12.00 A.M. - 1.00 A.M
TV Shows/24/Season 01/24 - S01E02 - 1.00 A.M. - 2.00 A.M
TV Shows/24/Season 01/24 - S01E03 - 2.00 A.M. - 3.00 A.M

If want to preserve the trailing "." then you can use a full custom format such as this:

Code: Select all

TV Shows/{n}/Season {s.pad 2}/{n} - {s00e00} - {t} [{vf}.{vc}.{ac}]
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Probably more like this:

Code: Select all

var command = ['C:\\absolute\\path\\to\\cmd.exe', '-c', 'C:\\absolute\\path\\to\\jdownloader-postprocess.cmd']
Using \\ instead of \ at all times, because \ is an escape character, and \\ is the literal \ character.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

This is what I put in my script based on the info you gave and I have:

Code: Select all

var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']
log(command)
log(callSync(command))

I found the log I think for it:

Code: Select all

------------------------Thread: 1792:ScriptEnvironment.log-----------------------

C:\Users\Chris Chester\AppData\Local\JDownloader 2.0>
Not sure if it is working or not.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok I think it is calling it but I am not sure because nothing else happens. This is the most recent log.

Code: Select all

C:\Users\Chris Chester\AppData\Local\JDownloader 2.0>
(c) 2018 Microsoft Corporation. All rights reserved.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok another update.

I changed what you gave me to this as my event script.

Code: Select all

@ECHO OFF

:: Input Parameters
set ARG_PATH=%1
set ARG_NAME=%2
set ARG_LABEL=%3

:: Configuration
set CONFIG_OUTPUT="C:/Torrent-Completed"

filebot -script fn:amc  "C:/Users/Chris Chester/Media" --output "C:/Torrent-Completed" --action duplicate --conflict skip -non-strict --log-file amc.log --def skipExtract=y unsorted=y music=y artwork=y excludeList=excludes.txt
Then I ran it in the JDownloader2 GUI and got not errors so I checked the log.

This is the log.

Code: Select all

------------------------Thread: 2152:ScriptEnvironment.log-----------------------
Run script [fn:amc] at [Tue Jan 22 02:44:20 EST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Argument[0]: C:\Users\Chris Chester\Media
Use excludes: C:\Torrent-Completed\excludes.txt (28)
No files selected for processing
Done ?(?????)?
Does this mean it works? It seems so.
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Yep, we now know that JD is calling our script, and that our script is calling FileBot successfully. Now it's time to go back, remove all your modifications, and then set it up with JD again with only the minimum amount of modifications, that ones which are required to make it work.

1.
Start from the beginning:
viewtopic.php?f=4&t=3478#p19358

2.
Modify the JD scripts to make them work on your Windows system.

i.e. change this:

Code: Select all

var script = JD_HOME + '/jdownloader-postprocess.sh'

to that:

Code: Select all

var script = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd']


3.
(Optional) Modify FileBot output folder if you're not happy with the default.

i.e. change this:

Code: Select all

set CONFIG_OUTPUT=%USERPROFILE%/Media
to that:

Code: Select all

set CONFIG_OUTPUT="X:/Media"
In this specific example, X:/Media must be an existing folder. You don't need to, nor should you, make any other changes to the CMD script (unless you spend time reading and understanding how it works, and want to customize it to your needs).
Gruff10
Posts: 2
Joined: 21 Jan 2019, 21:41

### Re: Plex Naming Schemes

Thanks. That worked, though the ":"s in the episode titles are a pain as well. At least the Validate button clears them
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

### Re: Plex Naming Schemes

Additional customizations like this will do the job:

Code: Select all

{n.colon(' - ')}

The {plex} format does take care of these corner cases already, and if you need all of those but if you want more control, then you can start with a format such as this, and then modify it to your needs:

Code: Select all

TV Shows/{n}/{episode.special ? 'Specials' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part$1')}{'.'+lang}
The .replaceAll(/[!?.]+\$/) bit is responsible for removing trailing !?. so you could just cut that bit.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok, I started over.

So I went to the website and copied what you had in the script window for Execute FileBot (PackageFinished) and the went into JDownloader2 and created the event script.

I then went on to do the same with the other script I went to the website and copied what you had in the script window for Execute FileBot (ArchiveExtracted) and the went into JDownloader2 and created the event script.

In that file I only changed set CONFIG_OUTPUT=%USERPROFILE%/Media to set CONFIG_OUTPUT="F:\Media"

**** Question : Is this supposed to point to where my files I want processed are or where I want them to goto? ********

So after all of that I ran a Test Run in the Scripter in JDownloader2 and it came back with errors still.

The first picture is what I did in JDownloader2 including what my script looks like. I noticed it highlights somethings are they errors?

The next picture is what JDownloader gives me as my error and it seems like it is the same as before.

I do want to get more advance with this later and I have been reading up on Filebot and AMC but I just want the basic for now.

Anymore thoughts, and again this is my first time trying this and using java to do it so I really do apologize for my ignorance.
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

1.
I think you need to copy & paste them into the UI. JD will store them in some file somewhere, but we don't need to care about that.

2.
Yes, the output option refers to the destination folder where files will end up. The input folder / file / name / label is passed in via command-line arguments 1, 2 and 3 so that's something JD will pass along to our cmd script via the JD event scripts. You don't need to worry about that.

3.
Didn't you already confirm that JD can make that call? Did you check where cmd.exe is actually located? Or did it work by just calling the *.bat file directly?

4.
Note that everything we're doing here has nothing to do with Java or FileBot specifically. We're just trying to get JD to call a command, could be any command.
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

I see an issue with the script, because it doesn't work if var script is suddenly an array of command and arguments, instead of just the executable path.

Remove this line:

Code: Select all

var script = JD_HOME + '/jdownloader-postprocess.sh'
Change this line:

Code: Select all

var command = [script, path, name, label, 'PACKAGE_FINISHED']
to this:

Code: Select all

var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']

Because before, var script was suddenly an array, instead of a file path, and so that didn't work at all.
chest069
Posts: 24
Joined: 01 Jan 2014, 11:09

Ok, so I made the changes and it didn't give me any errors in the JDownloader2 GUI scripter but nothing seemed to happen.

Currently this is what it looks like:

Code: Select all

var path = package.getDownloadFolder()
var name = package.getName()
var label = package.getComment() ? package.getComment() : 'N/A'

function isReallyFinished() {
for (var i = 0; i < links.length; i++) {
return false
}
}
return true
}

if (isReallyFinished()) {
log(command)
log(callSync(command))
}
This is what the log says which still makes me feel it is calling it and working. Correct me if I am wrong.

Code: Select all

------------------------Thread: 3968:ScriptEnvironment.log-----------------------
(c) 2018 Microsoft Corporation. All rights reserved.
As far as everything else

1) Ok thats what I was thinking.

2) Ok that clears that up and what I was thinking in how it worked.

3) I thought I did confirm that JD makes the call but I could be wrong cmd.exe is located in C:\Windows\System32 which is where you are pointing it. As far as the jdownloader-postprocess.cmd file yes I did run it on its own from the command line to check to see if it ran correctly and it did before but not now. I get the following when I run it on its own:

Code: Select all

C:\>jdownloader-postprocess.cmd
Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 10:59:38 EST 2019]
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = excludes.txt
Parameter: ut_dir =
Parameter: ut_kind = multi
Parameter: ut_title =
Parameter: ut_label =
Illegal usage: no input
Failure (°_°)
4. Ok thanks for pointing that out because I was sure.
rednoah
The Source
Posts: 19144
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Is this all? Is there no next line that shows FileBot running and saying things?

Code: Select all

------------------------Thread: 3968:ScriptEnvironment.log-----------------------
(c) 2018 Microsoft Corporation. All rights reserved.
In a previous log, you already showed that JD is calling FileBot, and that we can see FileBot console output from JD:

Code: Select all

--ID:2152TS:1548143061629-1/22/19 2:44:21 AM -  [org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment(log)] -> Locking C:\Users\Chris Chester\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Tue Jan 22 02:44:20 EST 2019]
That's what we wanna see. How did you get there before?

Code: Select all

var command = ['C:\\Windows\\System32\\cmd.exe', '-c', 'C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']

And this is good?

Code: Select all

var command = ['C:\\jdownloader-postprocess.cmd', path, name, label, 'PACKAGE_FINISHED']
`
IDK. Maybe. There's a reason I don't use Windows.

3.
If you call the cmd script with no arguments, i.e. no input, then this is the expected console output.