The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   AppleScripting Omni Apps (http://forums.omnigroup.com/forumdisplay.php?f=46)
-   -   OF: rename file name of an attachment? (http://forums.omnigroup.com/showthread.php?t=30212)

ctrl 2013-07-03 03:29 AM

OF: rename file name of an attachment?
 
How do you change a file's name when attaching it to a task?

Changing "[B]file name:this_item[/B]" 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[/CODE]

RobTrew 2013-07-03 11:40 PM

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 [url]http://macscripter.net/viewtopic.php?id=24364[/url] for example)

And then supply the full posix path of the renamed file to the [I]file name[/I] property of the [I]new file attachment[/I].

ctrl 2013-07-04 02:40 AM

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.


All times are GMT -8. The time now is 04:07 AM.

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