#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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. :] |
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
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. :] |
#5
|
|||
|
|||
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? |
#6
|
||||
|
||||
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. |
Thread Tools | |
Display Modes | |
|
|