<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 renameAllFiles it,".txt"end mouseUpon addSuffixToAllFiles aFolder,suffix  put listFileNames(aFolder) into theFiles  repeat with x = 1 to the number of lines of theFiles    put aFolder & line x of theFiles into finderItem    put quote & line x of theFiles & suffix & quote into newName    setFileName finderItem,newName  end repeatend addSuffixToAllFilesfunction 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>