Download Files

Download a Single File

// Name: Download a File
import "@johnlindquist/kit"
let url = "https://www.scriptkit.com/assets/logo.png"
let buffer = await download(url)
let fileName = path.basename(url)
let filePath = home(fileName)
await writeFile(filePath, buffer)

Open download-a-file in Script Kit

Discuss Post