Import From Specified Folders

Summary: Imports files from certain folders and then deletes them.
Requires: EagleFiler
Install Location: ~/Library/Scripts/Applications/EagleFiler/
Last Modified: 2022-11-29


EagleFiler normally watches the library’s To Import folder and Files folder and imports new files added to them. This script lets you add files to other folders, which are not part of the library. For example, this lets you add files to a folder on a shared network drive or to iCloud Drive using an iPhone. When you run the script, EagleFiler imports the files in those folders and then deletes them (so that the folders remain but are empty).

Installation Instructions · Download in Compiled Format · Download in Text Format


on run
my importFolderContents("/Volumes/NetworkDrive/FolderA")
my importFolderContents("/Users/you/Library/Mobile Documents/com~apple~CloudDocs/CloudFolder")
end run

on importFolderContents(_folderPath)
tell application "EagleFiler"
import files my listFolderPath(_folderPath) with deleting afterwards
end tell
end importFolderContents

on listFolderPath(_folderPath)
set _posixFile to POSIX file _folderPath
tell application "Finder"
return files of folder _posixFile as alias list
end tell
end listFolderPath