Skip to content

Instantly share code, notes, and snippets.

@zaydek-old
Last active November 25, 2016 09:01
Show Gist options
  • Save zaydek-old/dd86fec3a51164113a8cf981925b3bc7 to your computer and use it in GitHub Desktop.
Save zaydek-old/dd86fec3a51164113a8cf981925b3bc7 to your computer and use it in GitHub Desktop.
osascript <<!
on rename(dir, ext, f, r)
repeat with s in list folder dir
if s contains "." & ext then
set text item delimiters to f
set _ to text items in s
set text item delimiters to r
text items of _ as string
do shell script "mv " & quoted form of (dir & s) & " " & quoted form of (dir & result)
end if
end repeat
end rename
rename("/Volumes/SSD/trapezekaely/SF/", "otf", "test2", "-")
!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment