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

    Joined:
    Jan 15, 2015
    #1
    Hi,
    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!

    Thanks!!!
     
  2. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #2
    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.

    r.

    ----------

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

    Code:
    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