Last active
August 29, 2015 14:09
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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