Skip to main content
2. (remove un)necessary commands -- commands were necessary
Source Link
Hastur
  • 19.6k
  • 9
  • 56
  • 102

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a e <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>
find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>
find . -name "*.*" -exec SetFile -a e '{}' \;                          

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a e <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

find . -name "*.*" -exec SetFile -a e '{}' \;                          

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a e <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>
find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>
find . -name "*.*" -exec SetFile -a e '{}' \;                          
1. correct a mistype in the command; 2. remove unnecessary commands (mainly to overcome the 6-character edit limit)
Source Link

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a Ee <file>

To recursively hidehide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a e '{}' \;                          

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a E <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a e '{}' \;                          

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a e <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

find . -name "*.*" -exec SetFile -a e '{}' \;                          
Source Link
gagarine
  • 1.2k
  • 1
  • 12
  • 20

You can easily do this in Terminal with the SetFile command:

To hide file extension

SetFile -a E <file>

To show file extension

SetFile -a E <file>

To recursively hide file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a E '{}' \;                          

To recursively show file extensions in a directory and all sub-directories:

(You can change the second * to a particular extension type if needed)

cd <path to directory>

find . -name "*.*" -exec SetFile -a e '{}' \;