rename

I know there are bunch of different script on this forum that rename file
but i want a simple script
that just find a bunch of letters in file name and replace it with others.

Something like when select a bunch of script and then run the script.
than it prompt me for letters to find and than prompt me for letters to replace.

thanks

post some starting code and i am sure we all could help YOU write the code

unless you want us to just write it for you

Many users of the forum would be more than happy to HELP.
i am sure you will find that you will get a much better response to posts when you make an honest effort to try to code the task first then post your sample code for others to help with

A search for “replace text” at http://scriptbuilders.net will turn up a few results. In particular, a couple from Apple written by Sal Soghoian.

http://scriptbuilders.net/category.php?search=Replace+Text

“Replace Text in Selection Names” is most likely your best bet. And, as Joe has pointed out, please post the code you are having trouble with. It always helps if we have something to go by.

Hi :slight_smile:
Here my small contribution :

property TxtFind : ""
property TxtReplace : ""

on run
	tell me to open ({} & selection of application "Finder")
end run

on open Lst
	tell application "Finder"
		try
			if (Lst is {}) then error "No item selected..." number 10
			with timeout of 600 seconds -- 10 minutes
				set TxtFind to text returned of (display dialog "The text to find:" default answer TxtFind with icon 1)
				set TxtReplace to text returned of (display dialog "The text to replace:" default answer TxtReplace with icon 1)
			end timeout
			if (":" is in TxtReplace) or ("/" is in TxtReplace) then error "Characters «:» and «/» not supported..." number 12
			repeat with Itm in Lst
				set text item delimiters of AppleScript to TxtFind
				set NewName to text items of (get name of Itm)
				set text item delimiters of AppleScript to TxtReplace
				set name of Itm to ("" & NewName)
			end repeat
			error (display dialog "Completed work... :-)" & (beep) with icon 1) number -128
		on error mer number ner
			set text item delimiters of AppleScript to ""
			if ner is not -128 then display dialog "" & ner & " : " & mer & (beep 2) with icon 0
		end try
	end tell
end open

:wink:

thanks
fredo that is great