• 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: replacing characters in filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replacing characters in filenames


  • Subject: Re: replacing characters in filenames
  • From: yvan-koenig <email@hidden>
  • Date: Wed, 12 Jan 2005 10:49:50 +0100

Hello

It was really a problem of encoding.

Just edit this handler:


on createList(item_list)
set the the_items to list folder item_list without invisibles
set item_list to item_list as string
repeat with i from 1 to number of items in the the_items
set the_item to item i of the the_items
set the_item to (item_list & the_item) as alias
set this_info to info for the_item
set the item_name to the (name of this_info) as text -- EDITED HERE
if item_name contains search_string then
set changedFile to ((the_item as string) & return)
set changedFileLog to (((path to desktop folder) as text) & "ChangedFileLog.txt")
my write_to_file(changedFile, changedFileLog, true)
my replaceString(item_name, the_item, search_string, replacement_string)
end if
if folder of this_info is true then
my createList(the_item)
end if
end repeat
end createList



The UNICODE encoded name is now coerced as ASCII text and all works fine !!


Yvan KOENIG


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >replacing characters in filenames (From: Philip Regan <email@hidden>)

  • Prev by Date: Re: MD5 - DES
  • Next by Date: RE: replacing characters in filenames
  • Previous by thread: Re: replacing characters in filenames
  • Next by thread: RE: replacing characters in filenames
  • Index(es):
    • Date
    • Thread