Re: FindReplace by list
Re: FindReplace by list
- Subject: Re: FindReplace by list
- From: André Renault <email@hidden>
- Date: Sat, 4 Dec 2010 10:35:04 -0500
Very small file. Unpack it, and put it in an appropriate directory. From there you can run it.
Attachment:
snrm.zip
Description: Zip archive
On Dec 4, 2010, at 9:46 AM, Michel Raj wrote:
> Yes please, I'm interested in this !
>
> Regards,
> Michel
>
> Le 4 déc. 2010 à 13:46, André Renault a écrit :
>
>> Hi Michel
>>
>> I wrote a CLI utility that's called snrm - Search'N'Replace (Modified by a friend). Would you like me to upload it?
>>
>> Syntax is simple:
>> $ snrm pattern replacement file ...
>>
>> I tested it on a text file and it works quickly. Setting up a loop in AppleScript would be simple. If you had a list of in/out records, like {{search:"bob", replace:"fred"}, {search:"joe", replace:"james"}}, you could use a snippet:
>>
>> set fileToOperate to file "Macintosh HD:Users:Name:Desktop:TextFile.txt"
>> repeat with i in listOfSearchAndReplace
>> do shell script "/path/to/snrm " & i's search & space & i's replace & space & POSIX path of fileToOperate
>> end repeat
>>
>> On Dec 4, 2010, at 6:26 AM, Michel Raj wrote:
>>
>>> I'm looking for hints to make a multiple search replace on text docs (.doc or .rtf)
>>> Something similar to the FindReplaceByList script that comes with InDesign.
>>> Is there something existing already existing to do so ?
>>> Or are there tools ?
>>> If you just could hint me where or what to look for.
>>>
>>> TIA
>>> Michel Raj
>>> _______________________________________________
>>> 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