아는 사람만 쓴다는 맥 꿀기능, '폴더액션' 자동화 #shorts
페이지 정보
관련링크
본문
AI 비트코인 투자 자동화 무료 강의 보러가기
https://youtu.be/EOnaOpZy9ew?si=fyglKbkL5QY41RyT
실시간 GPT 투자 현황 지켜보기
http://3.35.214.209:8501
✅ 조코딩과 코딩 공부하기
https://jocoding.net/
👉 조카소 - 자막/번역/더빙 AI, 사진 AI 등
https://jocasso.codemafia.io
VVIP 멤버십 후원
그림자그림자님, 라다님, 차딩Chading TV님, prochild님, turtleday터틀데이님, AI Beauty Artist님, eyuri chi님, 정진균님, Tae hwan Kim님, TIPICE님, 올소리님, 주정뱅이님, Kyle Lee님, EI OI님, 에넬지아님 감사드립니다.
https://www.youtube.com/@jocoding/join
#it #맥
댓글목록
이거 상당히 괜찮아서 저도 맥의 바탕화면에 toJPG 라는 폴더를 만들어서 이미지 파일이 폴더에 들어오면
바로 JPG로 변환하고 원본은 지우도록 스크립트를 짰습니다.
스크립트는 다음과 같습니다.
on run {input, parameters}
repeat with eachFile in input
set filePath to POSIX path of (eachFile as alias)
-- 파일 이름에서 확장자 제거
set baseName to do shell script "basename " & quoted form of filePath & " | sed 's/\\.[^.]*$//'"
set parentDir to do shell script "dirname " & quoted form of filePath
set outputFile to parentDir & "/" & baseName & ".jpg"
-- 확장자 확인 (소문자로 변환 후 검사)
set fileExt to do shell script "echo " & quoted form of filePath & " | awk -F. '{print tolower($NF)}'"
-- JPG 파일은 무시
if fileExt is not "jpg" then
do shell script "/usr/bin/sips -s format jpeg " & quoted form of filePath & " --out " & quoted form of outputFile
do shell script "rm " & quoted form of filePath -- 변환 후 원본 삭제
end if
end repeat
end run