Timeline for answer to Show/hide extension of a file through OS X command line by slhck
Current License: CC BY-SA 4.0
Post Revisions
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 28, 2021 at 9:42 | comment | added | Mark Glossop | SetFile is deprecated as noted, but it's still present on Catalina. Using it worked well enough for me today. | |
| Nov 8, 2018 at 15:18 | history | edited | slhck | CC BY-SA 4.0 |
deleted 75 characters in body
|
| Nov 8, 2018 at 14:33 | comment | added | Franklin Yu | @slhck Not that I know of. I would use the AppleScript solution as you mentioned in answer. (And wish that Apple would not deprecate that as well.) | |
| Nov 8, 2018 at 7:19 | comment | added | slhck | @FranklinYu Thanks for the info. Do you know of a replacement? | |
| Nov 8, 2018 at 5:25 | comment | added | Franklin Yu |
SetFile is deprecated since Xcode 6. Also the link to manual page has expired.
|
|
| Oct 2, 2013 at 13:42 | comment | added | thandasoru | just what I was looking for.. thankfully I have Xcode installed and SetFile did the trick :-) | |
| Mar 12, 2012 at 22:20 | vote | accept | joshua.thomas.bird | ||
| Mar 12, 2012 at 21:50 | comment | added | slhck | You're right, of course. I added the full AppleScript event. In the future, just go ahead and add anything important to the answer – you're always welcome to. | |
| Mar 12, 2012 at 21:49 | history | edited | slhck | CC BY-SA 3.0 |
added 470 characters in body
|
| Mar 12, 2012 at 21:45 | comment | added | Daniel Beck♦ |
Strictly speaking, it's an alias, not a file. Here's how to use the AppleScript from the command line: on run argv [newline] tell application "Finder" to set extension hidden of (POSIX file (first item of argv) as alias) to true [newline] end run, use as osascript filename.scpt targetfile.
|
|
| Mar 12, 2012 at 21:38 | history | edited | slhck | CC BY-SA 3.0 |
added 256 characters in body
|
| Mar 12, 2012 at 21:22 | history | edited | slhck | CC BY-SA 3.0 |
added 256 characters in body
|
| Mar 12, 2012 at 21:16 | history | answered | slhck | CC BY-SA 3.0 |