View Single Post
Old 17.10.2017, 19:26
fred_gaou's Avatar
fred_gaou fred_gaou is offline
DSL User
Join Date: Mar 2016
Location: France
Posts: 37
Post [SCRIPT] Clean up and log finished packages

Trigger required: Interval
Please check the "Synchronous execution of script" box available in this edition panel to avoid multiple script executions at the same time and log file corruption (even if it should not happen anyway).
Author : freMea (myself)
Version : 2017.10.30
Download link:


Every time interval the user specified (OPTIONS: interval - default is 5 minutes), the script runs in background to remove downloaded and completed packages from the download panel if they are older than specified time (OPTIONS: finished_since - default is 60 minutes).

It is a better solution than the built-in feature option that remove packages as soon as they are completed because you may need to check some information about it before it gets removed from the list.

In any case, with this script, even if you set it to remove finished packages as soon as they are downloaded, all the informations about downloaded packages that have been removed by the script will be logged in the chosen target folder (OPTIONS: logPath - default folder is "%temp%" and log file name is 'JD - removed packages.log").

This log file won't grow up endlessly, its size is controlled by option that remove entries that are older than specified age in days (OPTIONS: max_logged_days - default is 3).

Note 1: %temp% is the default temporary folder that is used by the operating system and applications available to the currently logged on user. On Windows just write %temp% in the address bar of file explorer to open it.

If you want to customize the path (OPTIONS: logPath), I recommend to use / as a path separator no matter the OS you use, it will be translated correctly by JD even on Windows. Else if you want to use \ anyway, you will have to double it like c:\\path to\\my log.

Note 2: At first script execution, you'll be prompted to allow script to call JD API and to do other actions, all required to make it work.

(Use the OPTIONS section at the top of script to customize to your need)

Last edited by fred_gaou; 31.10.2017 at 00:19.
Reply With Quote