• 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: Last One - Replacing Chars of file name - I HATE TIDs.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Last One - Replacing Chars of file name - I HATE TIDs.


  • Subject: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • From: "Bob.Kalbaugh" <email@hidden>
  • Date: Sat, 25 Aug 2001 00:23:34 -0500

on 8/24/01 11:05 PM, T.J. Mahaffey at email@hidden wrote:

> Ok, I'm giving up. I tried the following script in various versions and it
> does nothing. No error, no nothing.
>
> on open theFileList
> repeat with thisFile in theFileList
> tell application "Finder"
>
> set {AppleScript's text item delimiters, oldTIDs} to {" ",
> AppleScript's text item delimiters}
>
> set theText to name of thisFile as string
>
> set AppleScript's text item delimiters to " "
I believe you may not need this line. You've already set it in the first
line under the tell Finder statement.


> set textList to text items of theText
>
> set AppleScript's text item delimiters to "_"
>
> set theText to textList as string
>
> set AppleScript's text item delimiters to oldTIDs
> end tell
> end repeat
> end open
>
> My final request is for someone to tweak this so it works. Now it's just
> about seeing how the h**l this is done. This thing has broken me and I just
> want to move on. I feel awfully stupid about this. I'm sure it's easy.

And Paul cleared up the issue with suggesting the use of the Finder to
rename the file so my guess is you now have a functioning script.

Your diligence has payed off threefold:

a. You have a script that you wrote yourself (nobody else wrote it) so pat
yourself on the back and call it your own, dang it.

b. You've learnt a lot through trial and error (which IMO is the one and
only true way to learn) Hate 'em or not, TID's is powerful stuff man, and
you'll be able to put 'em to good use in future scripts.

c. You've actually helped me by posting your efforts because I got something
from one of Paul's replies (regards to lists), so thanks for contributing.

I only mention these things 'cause ya seemed a little hard on yourself in
your posts. If I've offended you in any way, well please forgive me as no
offense is meant. I'm just a halfway old man, trying to learn here as well.

Cheers,

_bob.kalbaugh


References: 
 >Last One - Replacing Chars of file name - I HATE TIDs. (From: "T.J. Mahaffey" <email@hidden>)

  • Prev by Date: Re: MacOS 9.2.1 disappointment
  • Next by Date: Re: QuickTime Time from SMPTE Time
  • Previous by thread: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • Next by thread: Re: Last One - Replacing Chars of file name - I HATE TIDs.
  • Index(es):
    • Date
    • Thread