JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 18.05.2021, 20:54
jogol's Avatar
jogol jogol is offline
DSL User
 
Join Date: Nov 2015
Location: Deutschland
Posts: 37
Default Archive extraction and blacklist patterns

I have set the entry "4SJ" solely as archive extraction blacklist pattern and downloaded a rar archive which contains a file "4SJ" without any extension. During extraction of that archive I get a file named "4SJ" from the archive created in extraction folder.

Using a blacklist pattern as for example ".*\.txt$" results in excluding all files with suffix ".txt" from extraction, so far my setting looks to be correct.

Does the archive extraction blacklist patterns only apply to files with some suffixes like ".txt" or ".jpg" and not to files without any suffix?

How can I achieve that the file "4SJ" is skipped during extraction?
Reply With Quote
  #2  
Old 19.05.2021, 05:21
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,341
Default

Quote:
Originally Posted by jogol View Post
How can I achieve that the file "4SJ" is skipped during extraction?
Code:
.*\\4SJ$
Reply With Quote
  #3  
Old 19.05.2021, 08:22
jogol's Avatar
jogol jogol is offline
DSL User
 
Join Date: Nov 2015
Location: Deutschland
Posts: 37
Default Archive extraction and blacklist patterns

Quote:
Originally Posted by mgpai View Post
Code:
.*\\4SJ$
Sorry, that does not the trick - the file named "4SJ" is extracted nevertheless.
  • What is the double backslash for? There is no single backslash in the filename which should be reflected in the RE.
  • Does the setting only apply to newly downloaded and extracted archives?
  • Perhaps the setting is different in Windows and Raspberry Pi jDownloader?

Last edited by jogol; 19.05.2021 at 08:27.
Reply With Quote
  #4  
Old 19.05.2021, 08:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,341
Default

Quote:
Originally Posted by jogol View Post
Sorry, that does not the trick - the file named "4SJ" is extracted nevertheless.
The pattern matches only files named '4SJ' without any extension.

Code:
regex101.com/r/yZCi1w/1

Quote:
Originally Posted by jogol View Post
What is the double backslash for? There is no single backslash in the filename which should be reflected in the RE.
Pattern should match the whole filepath and not just the file name. \\ will match the the path separator, which will always precede the file name in the path.

Quote:
Does the setting only apply to newly downloaded and extracted archives?
The blacklist is applied to all archives at the time of extraction. Files matching the pattern will not be extracted.

Quote:
Perhaps the setting is different in Windows and Raspberry Pi jDownloader?
Platform should not make any difference.
Reply With Quote
  #5  
Old 19.05.2021, 09:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,672
Default

@jogol: Is the file in root folder or subfolder inside the Archive?
try
Quote:
(^|.*/)4SJ$
or provide links(password) to archive for testing
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 19.05.2021, 10:51
jogol's Avatar
jogol jogol is offline
DSL User
 
Join Date: Nov 2015
Location: Deutschland
Posts: 37
Default

Quote:
Originally Posted by mgpai View Post
The pattern matches only files named '4SJ' without any extension.

Code:
regex101.com/r/yZCi1w/1
Thanks for the example via regex101.com. This is exactly what I want and tried to explain.
Quote:
Originally Posted by mgpai View Post
Pattern should match the whole filepath and not just the file name. \\ will match the the path separator, which will always precede the file name in the path.
I thought a match anywhere in the file(path)name would be enough to trigger skipping this file. Matching the whole filepath name in blacklist patterns was new for me - that resembles some other settings in the past which did not work :-)
Quote:
Originally Posted by mgpai View Post
Platform should not make any difference.
On Raspberry Pi, which is Linux, the mentioned pattern does not trigger file skipping because of different path separator as compared to Windows. When I use
Code:
.*\/4SJ$
instead of your suggestion file skipping works on Raspberry Pi. Your suggestion works indeed only on Windows, but unfortunately I tried to solve this problem on Raspberry Pi :-/.

So platform makes a difference as far as I can see. One single pattern matching both on Raspberry Pi AND Windows at the same time would be for example the following:
Code:
.*[\/\\]4SJ$
Quote:
Originally Posted by Jiaz View Post
@jogol: Is the file in root folder or subfolder inside the Archive?
try
Code:
(^|.*/)4SJ$
or provide links(password) to archive for testing
Jiaz, the file is in a subfolder inside the archive, your suggestion would be needed only when the file is in the root folder. In this case there is no path separator in front of the file name and the caret for denoting the beginning of the string would be necessary.

So my conclusion for matching all said details so far would be to use a pattern like:
Code:
(^|.*[\/\\])4SJ$

Many thanks to all suggestions and I think my problem is solved now in a more general way than I thought of in the beginning.
Reply With Quote
  #7  
Old 19.05.2021, 11:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,672
Default

You don't have to escape the /, pattern should work with
Quote:
(^|.*[/\\])4SJ$
You only have to escape the / on the regex101 because there are minor differences between different regex engines
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 19.05.2021, 11:45
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,672
Default

Thanks for the feedback! Great to hear that you got it working
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 19.05.2021, 12:33
jogol's Avatar
jogol jogol is offline
DSL User
 
Join Date: Nov 2015
Location: Deutschland
Posts: 37
Default

Quote:
Originally Posted by Jiaz View Post
You don't have to escape the /, pattern should work with

You only have to escape the / on the regex101 because there are minor differences between different regex engines
You are right escaping the / is not needed - one char saved:)
Thanks!
Reply With Quote
  #10  
Old 19.05.2021, 13:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,672
Default

You're welcome
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:09.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.