• 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
Given a POSIX Path...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Given a POSIX Path...


  • Subject: Given a POSIX Path...
  • From: Marconi <email@hidden>
  • Date: Sun, 5 Dec 2010 10:49:40 -0700

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
  • Follow-Ups:
    • Re: Given a POSIX Path...
      • From: Luther Fuller <email@hidden>
    • Re: Given a POSIX Path...
      • From: Luther Fuller <email@hidden>
    • Re: Given a POSIX Path...
      • From: AndrĂ© Renault <email@hidden>
  • Prev by Date: OT: macfreelancer.com
  • Next by Date: Re: Given a POSIX Path...
  • Previous by thread: OT: macfreelancer.com
  • Next by thread: Re: Given a POSIX Path...
  • Index(es):
    • Date
    • Thread