slh*_*hck 13 finder keyboard-shortcuts file-management macos
有一件让我困扰了很长时间的事情:使用 OS X 10.6,当您浏览文件夹、展开它们以查看其内容时,有时您想在文件层次结构的底部创建一个新文件夹。
考虑这个例子:
some
??? nested
??? folder
Run Code Online (Sandbox Code Playgroud)
现在,选择“文件夹”后,按下??N会在可见层次结构的顶部创建新文件夹,即当前打开的 Finder 元素(在我的情况下是“测试”):

??? some
? ??? nested
? ??? folder
??? untitled folder
Run Code Online (Sandbox Code Playgroud)
这不是我需要的。我将不得不手动将“无标题文件夹”移动到其目标父文件夹,如果您 1) 不想使用鼠标,2) 无法剪切→粘贴像 Windows 中的文件夹和 3)当前文件夹包含很多元素。
我需要的是:

some
??? nested
??? folder
??? untitled folder
Run Code Online (Sandbox Code Playgroud)
应该在我当前选择的文件夹(即“文件夹”)中创建新文件夹。
注意:
有什么办法可以实现吗?
我知道 Automator 操作“新建文件夹”,但它将选定的 Finder 元素复制到目标文件夹中,并且插入的级别错误。例如,选择“文件夹”,结果将类似于:
??? some
??? nested
??? folder
??? untitled folder
??? folder
Run Code Online (Sandbox Code Playgroud)
一种(非常不推荐)的选择是为AppleScript 分配一个快捷方式,如下所示。10.7 中存在一个未解决的错误,该错误使该脚本或多或少无法使用。
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5596 次 |
| 最近记录: |