这是很长时间以来一直困扰我的事情:使用OS X 10.6,当您浏览文件夹并展开它们以查看其内容时,有时您想在文件层次结构的底部创建一个新文件夹。
考虑以下示例:
some
└── nested
└── folder
现在,选择“文件夹”后,按下⌘⇧N将在可见层次结构的顶部创建新文件夹,即当前打开的Finder元素(在我的情况下为“ test”):
├── some
│ └── nested
│ └── folder
└── untitled folder
这不是我所需要的。我将不得不手动将“无标题的文件夹”移动到其目标父文件夹,如果您1)不想使用鼠标,2)无法剪切→粘贴Windows中的文件夹和3)当前文件夹包含很多元素。
我需要的是:
some
└── nested
└── folder
└── untitled folder
新文件夹应在我当前选择的文件夹(即“文件夹”)中创建。
注意:
有什么办法可以实现?
I know the Automator action "New Folder", but it copies the selected Finder elements into the target folder, and it's inserted at the wrong level. For example, selecting "folder", the result will be something like:
└── some
└── nested
├── folder
└── untitled folder
└── folder
One (very unrecommended) option would be to assign a shortcut to an AppleScript like this. There's an open bug in 10.7 that makes the script more or less unusable.
tell application "Finder"
if insertion location as alias is desktop as alias or current view of Finder window 1 is in {icon view, column view} or selection is {} then
tell application "System Events" to tell process "Finder"
click menu item "New Folder" of menu 1 of menu bar item "File" of menu bar 1
end tell
return
end if
tell application "System Events" to key code 124 -- right arrow
set p to item 1 of (get selection)
try
set f to make new folder at p
on error
set f to make new folder at container of p
end try
set selection to f
end tell
tell application "System Events" to keystroke return
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句