View Single Post
  #5  
Old 10.09.2016, 12:51
DoctorD90 DoctorD90 is offline
Modem User
 
Join Date: Sep 2016
Posts: 1
Default md5sum

Generate md5 hash file in download folder
Code:
// Generate md5 hash file in download folder
// Trigger: "A Download Stopped"
// Latest updates: https://raw.githubusercontent.com/DoctorD90/jd_scripts/master/md5
// Credits: mgpai

if (link.isFinished()) {
	var filename = link.getName()
	var file = link.getDownloadPath()
	var folder = link.package.getDownloadFolder()
	var hashfile = folder + "/" + filename + "\.md5"
	if (getPath(hashfile).exists()) getPath(hashfile).delete()
	var MD5text = getChecksum("md5", file).toLowerCase() + "\t" + filename + "\n"
	writeFile(hashfile, MD5text, true)
}

Last edited by DoctorD90; 10.09.2016 at 13:29.
Reply With Quote