charlie649 Posted September 14, 2009 Posted September 14, 2009 I'm using 360works email to down load emails from a IMAP server. When it downloads an email with an attachment it puts that down in a temp folder on the local HD. I want to move that to a folder on the desktop. I have wrote a script that loops through the new emails recieved and it calls an applescript to move the emails. The problem is that it does not move all the attachments. it is not consistent sometimes it will move a file and some times it will not. Here is the applescript that I'm running tell application "FileMaker Pro Advanced" set cloc to cell "Temp path name" of current record set dp to cell "temp desktop path" of current record end tell end try tell application "Finder" set dloc to ((dp as text) & "Test_File_Move") end tell tell application "Finder" activate duplicate cloc to dloc delay (3) end tell Any help on this would be appreciated or if I could just direct them to some other place other than that temp folder when it downloads would be great too, I will take anything at this point
Smef Posted September 15, 2009 Posted September 15, 2009 (edited) I think that the easiest solution for you would be to use the EmailReadAttachment function to import the attachment into a container field, and then as your next script step use export field contents to save the attachment to a location on your hard drive. Also, this is the ScriptMaster forum. You should post Email plugin questions in the forum for that plugin. Edited September 15, 2009 by Guest
charlie649 Posted September 15, 2009 Author Posted September 15, 2009 Thanks for the reply, I did try to put them in a container field but some of the emails have 10 or 15 attachments and it would not import all of them. I most likely could have been something I was doing wrong.
charlie649 Posted September 17, 2009 Author Posted September 17, 2009 I think I have resolved this by replacing the part of the applescript that was duplicating the file. Here is the new applescript that I'm running (I changed the line where it was duplicating the file to move and it seems to work) tell application "FileMaker Pro Advanced" set cloc to cell "Temp path name" of current record set dp to cell "temp desktop path" of current record end tell end try tell application "Finder" set dloc to ((dp as text) & "Test_File_Move") end tell tell application "Finder" activate move file cloc to folder dloc delay (3) end tell Note: if I just used the move without saying move file to folder it did not work for some reason. For the time being I think the problem is resolved
Recommended Posts
This topic is 5614 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now