Re: Given a POSIX Path...
Re: Given a POSIX Path...
- Subject: Re: Given a POSIX Path...
- From: André Renault <email@hidden>
- Date: Sun, 5 Dec 2010 13:05:27 -0500
May I guess?
tell app "Finder" to set the name of the POSIX file (myfile) to "newname.ext"
On 2010-12-05, at 12:49 PM, Marconi wrote:
> Given the quoted form of a posix path to a file, how do I get that item's Finder info structure so I can rename that file?
>
>
> I have a script that gets the item info for files dropped onto the script and renames the file based on contents of that file. But each dropped file has a corresponding file with a similar name and a different suffix and I need to rename that file as well (based on the data in the original dropped ".txt" file).
>
> So, from the dropped item, for example:
> /Users/marconi/documents/myfile.txt
> I tell Finder to rename this item to myfile(something).txt
>
> For its companion file: /Users/marconi/documents/myfile.mpg I wish to make the same name change.
>
> I know its full path but I don't know how, given the POSIX path to /Users/marconi/documents/myfile.mpg to tell Finder to rename it.
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden