<pre>on mouseUp  ask "Folder whose files are to be suffixed:" with folderOfThisStack()  if there is not a folder it then exit to HyperCard else removeSuffixFromAllFiles it,".txt"end mouseUpon removeSuffixFromAllFiles aFolder,suffix  put listFileNames(aFolder) into theFiles  repeat with x = 1 to the number of lines of theFiles    if line x of theFiles contains suffix then      put aFolder & line x of theFiles into finderItem      put quote & removeSuffix(line x of theFiles) & quote into newName      setFileName finderItem,newName    end if  end repeatend removeSuffixFromAllFilesfunction removeSuffix filename,suffix  set the itemDelimiter to "."  delete last item of filename  return filenameend removeSuffixfunction listFileNames aFolder  put "tell application" && quote & "Finder" & quote & return after scriptVar  put "set myFiles to every file of alias" && quote & aFolder & quote & return after scriptVar  put "set output to" && quote & quote & return after scriptVar  put "repeat with x in myFiles" & return after scriptVar  put "set output to output & (name of x as string) & return" & return after scriptVar  put "end repeat" & return after scriptVar  put "return output" & return after scriptVar  put "end tell" after scriptVar  do scriptVar as appleScript  return the resultend listFileNameson setFileName finderItem,newName  put "set source to" && "(" & quote & finderItem & quote && "as alias)" & return after scriptVar  put "tell application" && quote & "Finder" & quote & return after scriptVar  put "set the name of source to" && newName & return after scriptVar  put "end tell" after scriptVar  do scriptVar as appleScriptend setFileNamefunction folderOfThisStack  put word 2 of the long name of this stack into folderPath  delete first char of folderPath  delete last char of folderPath  set the itemDelimiter to colon  delete last item of folderPath  return folderPath & ":"end folderOfThisStack</pre>