Automator remove characters beginning/end
I want to remove characters at the end of my file. Is it passible with apple scripts in Automator? Can you give me a example or scripts?
I have found this script but it removes numbers at the beginning of a files.. Many thanks!
on run {input, parameters}
repeat with thisFile in input
tell application "Finder"
set fileName to name of (thisFile as alias)
set fileName to (do shell script "echo " & quoted form of fileName & " | sed 's/^[0-9]*//'")
set name of thisFile to fileName
end tell
end repeat
return input
end run