#1
|
|||
|
|||
Help me express this rule on the unpacker
Hi,
I don't understand how to set the file unpacker to use these rules: If an archive contains only 1 file and no directories: don't create a subdir (unpack to the main directory) If an archive contains only 1 directory and 0 files on the first level: don't create a subdir (unpack to the main directory) In any other situation: 1 or more file / direcotry: create a subfolder in the main directory. |
#2
|
||||
|
||||
Please know that the rules in 'Extraction Settings' only apply to the subfolder created by JDownloader.
JDownloader does not remove folders from archive! It will extract the content to the given destination. That said, JDownloader is not able to to what you want to achieve. It does not alter the archive structure.
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
Maybe I have expressed my question unproperly.
When unpacker starts I don't want it to modify my arkive. I whish it extract to the destination folder following the rules I have written on my message If there is only one file, extract to the destination folder (I prefeer to be unique for all 1 file archives) If the archive contains more than one file/directory, create a subfolder. The original archive should not be modified |
#4
|
|||
|
|||
It actually does not work manually.
I have uploaded my configuration screenshot I have set a common extraction path. The flag "create subfolder based on package name" is set. I have selected "create a subfolder if at least 1 file in the archive. 0 folders and 0 folders 0 files (I don't undestand this settings, is there an help file ?) But JDOWNLOADER is I manually select the archive it unarchive in the folder where is locaded the file I have manually selected. |
#5
|
||||
|
||||
On your Screenshot in Settings, you have <jd:packagename> tag in folder. Please remove it, that way you ALWAYS append the packagename
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
Still does not work.
I found the file in download dir and not in the one that should be created. Also, where I could find the doc of the settings ? |
#7
|
||||
|
||||
I'm sorry but there is no doc for the settings. The short text should be easy enough to understand. Maybe the translation isn't good enough. Did you try to change language to english?
I can take a look via Teamviewer if you want, contact us via support@jdownloader.org Your screenshot shows that you set to use subfolder with name of package ONLY if root directory of archive contains at least 1 file.
__________________
JD-Dev & Server-Admin |
#8
|
|||
|
|||
Hi,
I have already changed the GUI language to english. Lets try to ged rid of the situation just here then we will try a teamviewer connection. The setting: Enabled: True Extract archive after each download: True Extract archive to the following folder: E:\_Extracted Should mean: after each archive has been downloaded extract to the root DIR of the "E:\_Extracted" folder. Then the other settings Create subfolder: True Create a subfolder only if the following condition are true. Now it comes the problem: which is the logic operation of the followin 3 settings ? They seems concatenated condition. Lets try some examples: 1) At least 1 file: true AND at least 1 folder: false AND at least 1 file and 1 folder: false Archive which contains onlyonefile.txt creates a subfolder. 2) At least 1 file: true AND at least 1 folder: true AND at least 1 file and 1 folder: false Archive which contains onlyonefile.txt DOES NOT create a subfolder. Archive which contains onlyonefile.txt onlyonedir/ Creates a subfolder Archive which contains onlyonedir/ DOES NOT create a subfolder. 3) At least 1 file: true AND at least 1 folder: true AND at least 1 file(s) or 1 folder(s): true Unable to decode this scenario. How could we have onlyonefile.txt and the third condition triggers if we must have At least 1 file: true AND at least 1 folder: true ???? |
#9
|
|||
|
|||
Things I have discovered so far:
- The rules are connected via OR, in English and Italian translation you use the form "AND at least" which let you think to a STRICT AND rule - %PACKAGENAME% is a nonsense when you unpack manually. It is %ARCHIVENAME% the correct one. - When Unpacking manually the "EXTRACT IN" extraction folder is not considered, ARCHIVE is unpacked inside the folder where it resides. - SUBFOLDER creation via rules accept only the last part of the path and not a whole one. - You have to restart JDownloader to let configuration changes work. Last edited by GiuseppeKK; 06.05.2017 at 22:02. |
#10
|
|||
|
|||
Hi,
I still have problem with the 3 rules for SUBDIR creation. We could avoid TeamViewer Connection with a simple explanation of their logic: are they concatenated by AND, OR, or is there any other logic inside ? |
#11
|
||||
|
||||
They are connected via AND
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 22.05.2017 at 12:09. |
#12
|
||||
|
||||
Yes, because in manual extraction, there are no packages to work with/get name from
__________________
JD-Dev & Server-Admin |
#13
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#14
|
||||
|
||||
I'm sorry but can you please provide an example? I don't understand
__________________
JD-Dev & Server-Admin |
#15
|
||||
|
||||
Quote:
__________________
JD-Dev & Server-Admin |
#16
|
||||
|
||||
AND
__________________
JD-Dev & Server-Admin |
#17
|
|||
|
|||
Please delete this duplicated post
Last edited by GiuseppeKK; 23.05.2017 at 06:18. |
#18
|
|||
|
|||
Thanks for having merged the various topic: a last one before I look at the various answers (note: haven't your replied "OR" on yesterday evening and now it is "AND" ? :-)
Well, if you start unpacker on a group of files and you receive an: "extraction of xxxxx.rar failed - (select here if you don't want to see this message again)" The whole unpack queue halts for input. There should be a selectable timeout as you can start the queue before going to bed only to discover once you wake up, it is stuck at the very first file with errors. Last edited by GiuseppeKK; 23.05.2017 at 06:31. |
#19
|
|||
|
|||
Logic AND (OR) or boolean AND ?
Yesterday I have set the first rule to "only if the root archive contains 0 files". This would stop creating subfolders until you have only directories. Instead the other rules where applied as if they where concatenated by OR and not by boolean AND. |
#20
|
|||
|
|||
A last one on this topic:
In the main file list once a file has been extracted, the status column shows: "Extraction OKMyfilename.zip" It should have a Colon and a Space in the middle: "Extraction OK: Myfilename.zip" (I have searched for few minutes for filenames starting with OK :-) |
#21
|
||||
|
||||
The condition is *at least*, so 0 will make a rule be ignored
Code:
if ( number of files < at least x files) return if (number of folders < at least x folders) return if (number of files+folders < at last x files or folders) return append subfolder
__________________
JD-Dev & Server-Admin Last edited by raztoki; 23.05.2017 at 10:05. Reason: fixed bbcode |
#22
|
||||
|
||||
Quote:
__________________
JD-Dev & Server-Admin |
#23
|
|||
|
|||
The last week of downloads has messed my extraction and download directory. I have created a wrong set of rules. We need to be on this topic again.
Quote:
In your code: what does mean "return" ? 1 --> Create the subdir ? 2 --> Evaluate the next rule ? And... this time I kindly request the following example rules which should trigger the creation of a subdir: 1) AT LEAST "1 file AND 1 DIR" or (AT LEAST) "2 files" or (AT LEAST) "2 directories" 2) AT LEAST "1 file AND 1 DIR" or (AT LEAST) "2 files" or (AT LEAST) "1 directory" Last edited by GiuseppeKK; 03.06.2017 at 00:10. |
#24
|
||||
|
||||
Return means 'quit the method'/do not append any subfolder
The rules work with AND, so currently it is not possible to create such a complex OR rule The rule evaluator works like (number of files < at least x files) AND (number of folders < at least y folders) AND (number of files+folder < at least z files or folders) x,y,z are the settings
__________________
JD-Dev & Server-Admin |
#25
|
|||
|
|||
Please,
could you add a way in the archive extractor to express the extraction logic using a formula other than the fixed set of rules ? I think having 2 variables: NUMDIR, NUMFILES, 3 operators (OR, AND, NOT), 6 comparators ">" "<" "<>" "=" ">=" "<=" and parenthesis (). Last edited by GiuseppeKK; 10.06.2017 at 06:01. |
#26
|
|||
|
|||
Also,
please note that the unpacker returns a generic "extraction fails" error without any reason if the unpacker can't unpack a package, this does not let me debug why some valid archives are not being unpacked. Last edited by GiuseppeKK; 10.06.2017 at 08:27. |
#27
|
|||
|
|||
... and if you can't add such formula, to me would suffice a fourth button: "OR at least [x dir and x files]" after the last one.
It would be nice if files and dir could have separate values. |
#28
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#29
|
||||
|
||||
Quote:
For example when it is unsupported RAR5 archive this may happen See here for RAR5 support, https://board.jdownloader.org/showthread.php?t=71069
__________________
JD-Dev & Server-Admin |
#30
|
|||
|
|||
Hi,
I have just locked the english version so I discovered the italian one is wrong and misleading: "al massimo" should be changed to "almeno" in both "folders" an "folders + files" setting. This is the reason of my confusion. |
#31
|
||||
|
||||
Thanks, will be updated with next core update
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|