Skip to content

Instantly share code, notes, and snippets.

@melmatsuoka
Last active August 29, 2015 14:09
Show Gist options
  • Save melmatsuoka/98bded54359c84c9713e to your computer and use it in GitHub Desktop.
Save melmatsuoka/98bded54359c84c9713e to your computer and use it in GitHub Desktop.
Path Finder: Rotate selected images in active Path Finder window counterclockwise (change the -r argument to sips command to rotate in different directions)
tell application "Path Finder"
set theSelection to selection
set selectionList to theSelection as list -- list of fsItems (fsFiles and fsFolders)
set LF to character id 10
set AppleScript's text item delimiters to LF
if theSelection is not missing value then
set fileList to {}
repeat with aFile in selectionList
set end of fileList to POSIX path of aFile
end repeat
--return fileList as list
end if
repeat with theItem in fileList
do shell script "sips -r -90 " & quoted form of theItem & " &"
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment