MacOS sierra 10.12 screen captures – how to edit system files

filesystemmacosscreen capturesystem-prefs

Is there a possibility to edit the following files in macOS 10.12 Sierra:

/System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings

and

~/Library/Preferences/com.apple.screencapture.plist

I want to change the following things of the Screenshot-Files:

  • Filename
  • Location
  • Date and time Format in file name (no, that could NOT be done via System Preferences!)

Previous naming scheme: Screenshot 20161004_162222.png

Naming scheme now: Screenshot 2017-08-07 um 17.02.08.png

I want to revert to the previous scheme.

My problem is, that I can edit both files, but only on the second I can also save them.
BatChmod nor chmod in terminal can change permissions on first file

ls -la /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings
-rw-r--r--  1 root  wheel  1390 Feb  2  2017 /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings

sudo chmod 777 /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings
Password: ***
chmod: Unable to change file mode on /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings: Operation not permitted

Best Answer

There is no need to disable SIP and hack /System files to change the filename and location of screenshots. Use the following Terminal commands to set your preferences:

#SCREEN CAPTURE
# Show/ Don't show date in Screenshot filename
defaults write com.apple.screencapture include-date -bool false

# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"

# Save Screenshots to location:
defaults write com.apple.screencapture location ~/Desktop/Screenshots

# Disable Screen capture's shadow
defaults write com.apple.screencapture disable-shadow -bool true

# Change the filename
defaults write com.apple.screencapture name [yourFilename]

You may need to quit and relaunch the SystemUIServer, (or restart).

If you need a more specific workflow, then you can modify or process the files with a Folder Action script, to run when they are created.