The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
OF: rename file name of an attachment? Thread Tools Search this Thread Display Modes
How do you change a file's name when attaching it to a task?

Changing "file name:this_item" to something like "file name:this_item & "your extension"" does not work as OF won't find a file like this (obviously).

Thanks for any hints.


This is the process for attaching a file with its original name:
Code:
set NewTask to make new inbox task with properties {name:file_name}
tell the note of NewTask
make new file attachment with properties {file name:this_item, embedded:pEmbedFile}
end tell
 
I think you will need to begin by changing the name of the file itself through the operating system, or by scripting the Finder

(See http://macscripter.net/viewtopic.php?id=24364 for example)

And then supply the full posix path of the renamed file to the file name property of the new file attachment.
 
Yes, that is what I am doing currently.

Unfortunately - as the files will be exported to a Dropbox folder - renaming files that quickly results in duplicate files.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 03:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.