Skip to content

Instantly share code, notes, and snippets.

@poritsky
poritsky / name-to-comments.applescript
Created September 2, 2015 16:46
Copy selected file name without extension to comments.
tell application "Finder"
set theFile to selection as alias
tell application "System Events" to tell disk item (theFile as text) to set {theName, theExtension} to {name, name extension}
if theExtension is not "" then set theName to text 1 thru -((count theExtension) + 2) of theName -- the name part
set comment of theFile to theName
end tell
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>font-name-aliases</key>
<dict>
<!-- N.B. 'system-font' is also available as an alias; it will be mapped to the actual system font at runtime. -->
<key>light</key>
<string>.SFNSText-Light</string>
<key>light-italic</key>