RE: replacing characters in filenames
RE: replacing characters in filenames
- Subject: RE: replacing characters in filenames
- From: "Jan-Bultereys" <email@hidden>
- Date: Wed, 12 Jan 2005 11:15:21 +0100
- Thread-topic: replacing characters in filenames
thanks Yvan,
Yes it works fine now, thanks for finding this out.
best regards,jan
> ----------
> From: applescript-users-bounces+jan.bultereys=email@hidden on behalf of yvan-koenig
> Sent: Wednesday, January 12, 2005 10:49 AM
> To: Applescript Users
> Subject: Re: replacing characters in filenames
>
> 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
>
>
_______________________________________________
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