#1
|
|||
|
|||
![]()
Hallo JD legt die Ordnernamen vor Downloadstart auf verschiedene Wege fest.
Ich möchte nun bevor der Ordner erstellt wird das JD nochmals überprüft wie lange der zu erstellende Ordner ist und diesen dann wenn notwendig auf maximal 30 Stellen kürzt. (Wenn möglich individuell einstellbar im script) Ich möchte dadurch zu Lange und unübersichtliche Ordner vermeiden. Mit den Packagizer ist dies nicht mögllich, deswegen wurde ich auf den Eventscripter verwiesen. Da ich vom scripten keinen Plan habe wollte ich fragen ob da jemand eine lösung für mich hätte. Gruß Kell ENG: Hello, JD determines the folder names in different ways before starting the download. I would like JD to check the length of the folder name before it is created and, if necessary, shorten it to a maximum of 30 characters. (Ideally, this should be adjustable in the script.) My goal is to avoid excessively long and cluttered folder names. This is not possible with the Packagizer, which is why I was referred to the EventScripter. Since I have no experience with scripting, I wanted to ask if someone has a solution for me. Best regards, Kell |
#2
|
|||
|
|||
![]() Quote:
Code:
/* limit package name trigger : a new link has been added IMPORTANT : disable 'synchronous execution' check box in the top panel' */ crawledLink.package.name = crawledLink.package.name.replace(/(.{30}).+/,"$1 (...)"); The download folder will no longer be 'dynamic', if it is set in the script. So, it only modifies the package name. Use a sub-folder by package name rule to set it as the download folder. Trailing 'dots' are replace by JD, so the script uses (...). You can replace it with characters of your choosing. |
#3
|
|||
|
|||
![]()
Thank you very much! It worked perfectly.
After some experimenting, I got the result I prefer. crawledLink.package.name = crawledLink.package.name.replace(/(.{30}).+/,"(...) $1"); |
![]() |
Thread Tools | |
Display Modes | |
|
|