#1
|
|||
|
|||
Move files after finished to another drive:\folder
Hi,
- Is there a way to move files/folders when they are completely finished ( archives extracted if any, and links is removed from jdl ..) idealy would be nice if i could set à folder ( drive:\folder ) to set new destination whan file is done/complete... ------- I was watching / searching jdl boards... I found / looked: Script to move file after finished https://board.jdownloader.org/showth...ile#post485531 I also look here but could not find what i am looking: https://board.jdownloader.org/showthread.php?t=70525 ----- I just want a global simple method to move all files to another drive:\folder when dl files finished... Many thanks in advance. Note / adding: I just tried this, but don't work yet... if this is the way ? can you tell me what's wrong in my script ? tks. // Move downloaded files to user-specified folder // Trigger: A Download Stopped if (link.finished) { var destinationFolder = "/home/"; getPath(link.downloadPath).moveTo(R:\Files_Done); } Last edited by steveallen; 16.05.2022 at 19:34. Reason: adding ... |
#2
|
||||
|
||||
@steveallen: you can either make use of Eventscripter and a script to move finished files, see https://board.jdownloader.org/showthread.php?t=70525
or a combination of Packagizer Rules and Eventscripter script. Packagizer rule to download archives into temp location and script to move extracted files to final location while another Packagizer Rule that changed download location for non archive files directly to the final location.
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
sorry did not seen your reply first...
I just tried this, but don't work yet... if this is the way ? can you tell me what's wrong in my script ? tks. // Move downloaded files to user-specified folder // Trigger: A Download Stopped if (link.finished) { var destinationFolder = "/home/"; getPath(link.downloadPath).moveTo(R:\Files_Done); |
#4
|
||||
|
||||
@steveallen: as far as I know there is more sophisticated script because that simple script will make extraction fail as it moves the files *away* before JDownloader had a chance to complete extract it.
Please use search in that thread or ask in it for help/hint. you should go with the "Packager rule + Eventscripter script* solution because you can directly download non archive files to final directory and not have to move them around in first place
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
This script works for files under a sub folder :
- it move all files under a sub folder but actually i would like to move the complete sub folder ... can you tell me what to change to the script ? Thanks // Move finished non-archive files, to user defined folder // Trigger required: "A Download Stopped" var destFolder = "c:/myFolder/Finished"; if (link.isFinished() && !link.getArchive()) { getPath(link.getDownloadPath()).moveTo(destFolder); } |
#6
|
||||
|
||||
@steveallen: please ask questions about scripting/scripts in the thread for eventscripter. There ppl will read it and can provide help/hints. Doesn't make sense in spreading questions about scripts across different threads.
__________________
JD-Dev & Server-Admin Last edited by pspzockerscene; 17.05.2022 at 12:38. Reason: Added hyperlink for EventScripter thread |
Thread Tools | |
Display Modes | |
|
|