Trim filenames in automator w. shell or applescript
The reason your shell script isn't doing what you want is because Automator passes the full path of the files as arguments.

If the full path to one of the files is /Users/foo/Temp/file1.txt, then your script attempts to rename it to ers/foo/Temp/file1.txt, which isn't what you want.

Try this instead:

for f in "$@"; do
  FILENAME=$(basename "$f")
  DIRNAME=$(dirname "$f")
  mv "$f" "${DIRNAME}/${FILENAME:3}"
done


Better still (handles relative filenames correctly):

for f in "$@"; do
  FILENAME=$(basename "$f")
  DIRNAME=$(dirname "$f")
  if [ -z "$DIRNAME" ]; then
    DIRNAME="."
  fi
  mv "$f" "${DIRNAME}/${FILENAME:3}"
done