JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 08.07.2019, 12:03
Wurstinator Wurstinator is offline
Modem User
 
Join Date: Jul 2019
Posts: 1
Default Packagizer: URL path to download directory

I have a list of URLs in plain text. These URLs describe a directory structure on the server, e.g. **External links are only visible to Support Staff**www.website/dir1/dir2/file.exe .
Using the normal LinkGrabber will make JDownloader write all these files into the same directory, i.e. I'd end up with website/file1.exe, website/file2.exe, and so on. Rather, I'd like to preserve the folder structure, i.e. download the file into dir1/dir2/.

I am using the Packagizer with two rules:

If Sourceurl contains
Code:
**External links are only visible to Support Staff**
Then set Download Directory
Code:
<jd:source:1>
An example URL would be
Code:
**External links are only visible to Support Staff**
The issue with this approach is that the "intermediate directory", i.e. the contents of <jd:source:1>, is taken as a string and has all occurrences of / replaced by an underscore. For example, the Download Folder will be "7th Sea Guides_02 Character Info_".

Is there a way to fix this?
Reply With Quote
  #2  
Old 08.07.2019, 13:09
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,144
Default

all / within filenames are replaced at the core as they are deemed illegal characters.
at best do not listen for it, and manually place in the path <jd:source:1>/<jd:source:2>

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #3  
Old 08.07.2019, 19:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

You either have to create a rule for different level of depths
like
1.) ..../([^/]+)/([^/]+)
2.)...../([^/]+)/([^/]+)/([^/]+)
3.)...../([^/]+)/([^/]+)/([^/]+)/([^/]+)

or use the eventscripter and write script, see https://board.jdownloader.org/showthread.php?t=70525
that parses the path and sets the download folder as wished.
in case you need help, ask/contact mpgai. He's our script master
__________________
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 12:22.
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 - 2019, Jelsoft Enterprises Ltd.