#1
|
|||
|
|||
Use url structure as subfolders
I would like to recreate the structure of the subfolders of the URL and place the file inside the last folder. I already tried the tutorials but JDownloader only creates the last folder of the URL.
My default downloads folder is "D:\JDownloader\Downloads" Test URL: **External links are only visible to Support Staff****External links are only visible to Support Staff** I would like this structure to be created: "D:\JDownloader\Downloads\2 - Flashcards\MedCards - Atualizado 2022\MC - Cirurgia\Queimaduras.apkg" Best regards! |
#2
|
||||
|
||||
@nicolau: can you show your rule? so we can check/tell you what you did wrong?
Either a screenshot or export the rule and attach here or send to support@jdownloader.org
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
Quote:
Now I'm trying to create a script. The script would take the url and move it to the folder referring to the url. But without success so far. Code:
if (link.isFinished()) { var url = link.getContentURL(); alert(url+"\r\n"); var url = url.replace('\\','/'); alert(url+"\r\n"); getPath(link.getDownloadPath()).moveTo(destFolder); } Last edited by Jiaz; 25.09.2022 at 12:30. |
#4
|
||||
|
||||
@nicolau: Thanks. I thought you already tried via packagizer rules
Create a Settings->Packagizer Rule-> Code:
if sourceURL - contains - .*exvsnprkvb\.one/([^/]*)/([^/]*)/([^/]*)/[^/]* (enable regex checkbox) then set download folder - <jd:source:1>/<jd:source:2>/<jd:source:3>
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 25.09.2022 at 12:32. |
#5
|
||||
|
||||
What exactly do you mean? backslash on test?
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
I would like to change de destination folder: "D:\JDownloader\Downloads\Queimaduras\Queimaduras.apkg" To: "D:\JDownloader\Downloads\2 - Flashcards\MedCards - Atualizado 2022\MC - Cirurgia\Queimaduras.apkg" A relative path local to the original url Last edited by nicolau; 25.09.2022 at 12:39. |
#7
|
||||
|
||||
@nicolau: my example packager rule does exactly this, see https://board.jdownloader.org/showpo...79&postcount=4
with that rule your downloads will go to right directory in first place and not have to move after downloads. You have to adapt the rule in order to different number of *subfolders*
__________________
JD-Dev & Server-Admin |
#8
|
|||
|
|||
Quote:
**External links are only visible to Support Staff**www.site.com/dir1/dir2/dir3/file1.ext **External links are only visible to Support Staff**www.site.com/dir1/dir2/dir3/dir4/file2.ext **External links are only visible to Support Staff****External links are only visible to Support Staff** Is possible to do this with one only package ruler? Last edited by nicolau; 25.09.2022 at 13:21. |
#9
|
||||
|
||||
@nicolau: unfortunately at the moment it's not yet possible. So you have to create rule for each different level of depth. just take existing rule and add new
Code:
([^/]*)/ Code:
/<jd:source:4>
__________________
JD-Dev & Server-Admin |
#10
|
|||
|
|||
Right. Thank you very much
|
#11
|
||||
|
||||
@nicolau: In case you need further help/got questions, just ask
__________________
JD-Dev & Server-Admin |
|
|