• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Given a POSIX Path...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Given a POSIX Path...
      • From: Marconi <email@hidden>
References: 
 >Given a POSIX Path... (From: Marconi <email@hidden>)

  • Prev by Date: Given a POSIX Path...
  • Next by Date: Re: Given a POSIX Path...
  • Previous by thread: Given a POSIX Path...
  • Next by thread: Re: Given a POSIX Path...
  • Index(es):
    • Date
    • Thread