Applescript Hot folder

Discussion in 'Mac Programming' started by mgs-script, Jan 15, 2015.

  1. mgs-script, Jan 15, 2015
    Last edited: Jan 16, 2015

    mgs-script macrumors newbie

    Jan 15, 2015
    I'll set up an "Incoming Hot Folder" that get TIFF files copied to it.

    After the files have been processed by Photoshop, I'd like the files in the "Incoming Hot Folder" to be deleted. The processed files will be saved in "Outgoing Hot Folder".

    I'll use an Apple Script and connect it to "Folder Actions" in the OS.

    My question:
    How do I solve the delete stage in this process? When files are processed, I want them to go away!

  2. superscape macrumors 6502a


    Feb 12, 2008
    East Riding of Yorkshire, UK
    Well, you could just move them instead of deleting.

    I think you're going to need to show the code you have so far before anyone can give you much more specific help.



    ...for example, the following code demonstrates moving a files one by one from one folder to another:

    set theIncomingFilesFolder to choose folder with prompt "Please choose the INCOMING files folder"
    set theCompletedFilesFolder to choose folder with prompt "Please choose the COMPLETED files folder"
    tell application "Finder"
    	set theFileList to every file of theIncomingFilesFolder
    	repeat with theFile in theFileList
    	--do something with theFile here
    		move theFile to theCompletedFilesFolder
    	end repeat
    end tell

Share This Page