如何使用Finder在嵌套文件夹层次结构中创建新文件夹?

slhck

这是很长时间以来一直困扰我的事情:使用OS X 10.6,当您浏览文件夹并展开它们以查看其内容时,有时您想在文件层次结构的底部创建一个新文件夹。

考虑以下示例:

some
└── nested
    └── folder

现在,选择“文件夹”后,按下N将在可见层次结构的顶部创建新文件夹,即当前打开的Finder元素(在我的情况下为“ test”):

├── some
│   └── nested
│       └── folder
└── untitled folder

这不是我所需要的。我将不得不手动将“无标题的文件夹”移动到其目标父文件夹,如果您1)不想使用鼠标,2)无法剪切粘贴Windows中的文件夹和3)当前文件夹包含很多元素。

我需要的是:

some
└── nested
    └── folder
        └── untitled folder

新文件夹应在我当前选择的文件夹(即“文件夹”)中创建。

注意:

  • 我希望使用键盘快捷键来完成此操作我不经常使用鼠标。
  • 我不想使用任何其他Finder视图(例如Columns

有什么办法可以实现?


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
Lri

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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Py:使用嵌套文件夹创建文件夹层次结构

如何在Mutt中创建新文件夹

如何使用diff创建补丁程序以删除文件夹并创建新文件夹?

当已经存在同名文件夹时,如何使用boost创建新文件夹?

使用DotNetZip库从内存流创建zip文件时如何传递文件夹层次结构

使用Powershell监视文件夹中的新文件,但忽略新文件夹

在FileNet中搜索特定文件夹的文件夹层次结构

如何在文件夹层次结构中引用作业?(Jenkins Cloudbees文件夹插件)

如何使用Storage Access Framework在SD卡中创建新文件夹?

如何使用AWS PowerShell在S3中创建新文件夹

如何获取文件夹中的最新文件?

Java中的mkdir创建新文件夹

无法在首页中创建新文件夹

Multer使用数据创建新文件夹

如何批量更改文件的文件夹层次结构?

从新文件夹(而不是文件夹)中的文件创建符号链接

OS X Finder“新文件夹”变暗

观看在目录中创建的新文件夹,输出新文件的路径

如何使用bash将子文件夹中的所有文件移动到新文件夹中?

使用pathlib在python中创建新文件夹并将文件写入其中

使用perticular目录中的jenkins为每个EAR文件构建创建新文件夹

如何从文件夹层次结构创建平面目录并处理重复文件?

如何使用Java代码刷新文件夹?

无法在“文件夹层次结构栏”中键入文件夹路径

如何使用python获取文件夹中的最新文件

如何使用Powershell脚本执行文件夹中的最新文件(刚刚下载)

GoogleDrive API - 如何从python中的文件获取文件夹层次结构

如何在Amazon S3存储桶中创建新文件夹?

如何在Files / Nautilus中创建新文件夹