JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 18.07.2020, 12:30
zigo.zago zigo.zago is offline
Modem User
 
Join Date: Jul 2020
Posts: 3
Default batch rename files with identical name

Hi all!.
I'm downloading some image files, pages of ancient books.
The original addresses are something like:

**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

All the downloaded files have the name 3580 and the order is the order of downloading.
So I would like to rename them before downloading.
I can obtain the right order clicking on 'download from', but is there a formula in batch rename to serialize them in the order I choose?
Or to copy the name of the download address?

Thanks!
Reply With Quote
  #2  
Old 18.07.2020, 13:03
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

you could rename them via package customiser rule (on entry into linkgrabber),
or
event scripter, script (say you already downloaded).

grab the component of your url, I guess /(\d+\.tif) is what your wanting?
then utilise it via dynamic tag (package customiser rule) or event scripter will be within a var name of your choosing.

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 18.07.2020, 13:36
zigo.zago zigo.zago is offline
Modem User
 
Join Date: Jul 2020
Posts: 3
Default

Thanks raztoki.
Can you help me a bit more? I'm not so expert...
So, here is the download link of 5 files:

**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I need to analize the links, than I have 5 files, all with 3580 name.
The 'natural' downloading order is 5, 1, 3, 2, 4.
If I order the links clicking on "download from", I have the correct sequence on the left.
Than I'd need to butch rename these 3580 files before downloading.

But from your instruction I've not been able!

Last edited by zigo.zago; 18.07.2020 at 14:46.
Reply With Quote
  #4  
Old 18.07.2020, 17:48
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

so you are happy with 0001.tif as your filename?
package customiser rules
downloadurl contains loc\.gov/diglib/media/[^/]+/(\d+\.tif)/\d+ (tick the regex checkbox)
and then..
filename *right click > dynamic tags > <jd:hoster:1> to reference 0001.tif
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #5  
Old 18.07.2020, 21:17
zigo.zago zigo.zago is offline
Modem User
 
Join Date: Jul 2020
Posts: 3
Default

Thanks raztoki.
Now it saves each file with the new name (i.e. 0001.tif), but each file in a folder with the same name:

**External links are only visible to Support Staff****External links are only visible to Support Staff**

How can I group the files in one folder only?
Reply With Quote
  #6  
Old 19.07.2020, 05:30
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

just place in a listener for another part of the url for package name reference and adjust the dynamic tag numbers accordingly
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 19.07.2020 at 05:38.
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:16.
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 - 2020, Jelsoft Enterprises Ltd.