Soy un novato en AppleScript. Después de horas y horas no puedo encontrar cómo añadir ceros a la izquierda a este rename script, que cambia el nombre de un montón de pngs y jpgs etc. al nombre de la carpeta principal.
Actualmente añade _1, _2 al nombre del archivo mientras que me gustaría que fuera _001, _002
¿Cómo se reescribiría este script para hacerlo?
en ejecución {entrada, parámetros}
tell application "Finder"
repeat with thisItem in input
set folderName to name of thisItem
set theseFiles to files of entire contents of thisItem
repeat with i from 1 to count theseFiles
set name of item i of theseFiles to ¬
folderName & "_" & i & "." & ¬
name extension of item i of theseFiles
end repeat
end repeat
end tell
end run
Gracias.