The Omni Group Forums

The Omni Group Forums (
-   AppleScripting Omni Apps (
-   -   OF: rename file name of an attachment? (

ctrl 2013-07-03 04: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-04 12:40 AM

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][/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 03: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 09:31 AM.

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