Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set thefile to choose file
- tell application "Finder"
- set filename to name of thefile
- set rfilename to reverse of characters of filename as string
- set rtheSuffix to text 1 thru ((offset of "." in rfilename)) of rfilename
- set thesuffix to reverse of characters of rtheSuffix as string
- set filenamereverse to text ((offset of "." in rfilename) + 1) thru -1 of rfilename
- set name of file thefile to filenamereverse & thesuffix
- end tell
- (* Rev 1
- set thefile to choose file
- tell application "Finder"
- set filename to name of thefile
- set thePrefix to text 1 thru -5 of filename
- set thesuffix to text -4 thru -1 of filename
- set filenamereverse to reverse of characters of thePrefix as string
- set newname to filenamereverse & thesuffix
- set name of file thefile to filenamereverse & thesuffix
- end tell
- *)
Advertisement
Add Comment
Please, Sign In to add comment