Re: Given a POSIX Path...
Re: Given a POSIX Path...
- Subject: Re: Given a POSIX Path...
- From: Marconi <email@hidden>
- Date: Sun, 5 Dec 2010 12:12:50 -0700
At 1:05 PM -0500 12/5/10, André Renault sent
email regarding Re: Given a POSIX Path...:
May I guess?
tell app "Finder" to set the name of the POSIX file (myfile) to "newname.ext"
That doesn't do it:
Can't set <<class psxf>>
"'/Volumes/Disk/Path/to/file.ext" of Application
"Finder" to "newname.ext".
I also tried:
set item_info to info for POSIX file (FilePath)
but got a file not found for the file value in FilePath.
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