【问题标题】:Get the full network path of a file on a Mac - terminal在 Mac 上获取文件的完整网络路径 - 终端
【发布时间】:2011-12-15 08:27:04
【问题描述】:

我正在尝试获取网络文件页面,例如smb://server.local/tech/file.pdf

您可以在文件“获取信息”窗口中看到此信息,但我看不到使用命令行(甚至 Applescript)获取此信息的方法。

编辑: 我目前有这个:

on open filePath
    set filePath to POSIX path of filePath
    set the clipboard to filePath as text
end open

但它只复制了挂载的路径,而不是 smb:// 路径。

【问题讨论】:

  • 除非我弄错了,文件/文件夹的几乎所有属性都可以用 AppleScript 检索(即kind of this_file)。所以,除非我弄错了,否则你应该可以get network file page of refToSomeFile

标签: macos networking terminal applescript


【解决方案1】:

Automator 会这样做。

  • 请求服务器
  • 复制到剪贴板

Download it here.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-28
    • 1970-01-01
    • 2013-11-24
    • 2016-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多