2011-05-02 67 views
1

当我看到MAC中的文件夹或文件的信息时,“Server”的等效applescript是什么?如何从applescript中检索文件夹/文件的服务器详细信息

on run 
    set selectedItem to (choose file with prompt "Select a file to read:" of type {"TEXT"}) 


    tell application "Finder" 
     set selectedItem to (item 1 of (get selection)) 
     set infoList to {} 
     copy ("Displayed Name: " & displayed name of selectedItem) to end of infoList 
     copy ("Kind: " & kind of selectedItem) to end of infoList 
     copy ("Size: " & size of selectedItem & " (" & physical size of selectedItem & ")") to end of infoList 
     copy ("Created: " & creation date of selectedItem) to end of infoList 
     copy ("Modified: " & modification date of selectedItem) to end of infoList 
     copy ("Name & Extension: " & name of selectedItem) to end of infoList 
     copy ("Locked: " & locked of selectedItem) to end of infoList 
     copy ("Comments: " & comment of selectedItem) to end of infoList 
     copy ("Owner: " & owner of selectedItem) to end of infoList 
    end tell 
    set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return} 
    set infoAsString to infoList as string 
    set AppleScript's text item delimiters to od 
    set the clipboard to infoAsString 
    return infoAsString 
end run 
+0

从什么平台是“服务器”,究竟是什么呢? – 2011-05-02 13:47:13

+0

@Philip“服务器”是当我们在mac中打开文件夹/文件的信息时显示的信息。 – Samrat 2011-05-17 10:25:20

回答

1

的更多细节将是有益的,但如果你试图得到一个安装服务器的体积而不是本地卷上的文件夹上的信息,有没有区别尽可能的AppleScript而言,至少一旦它被安装。获取它可能是另一个问题。

tell application "Finder" to get 
    properties of folder "Macintosh HD:Volumes:Mounted Server Volume" 
end tell 
+1

我试图获取已安装的服务器卷上存在的文件夹的信息。我能够检索除服务器详细信息之外的所有详细信息这可能有助于检索挂载IP的位置。到目前为止,我的问题是如何实现检索细节。 – Samrat 2011-05-03 04:37:02

+0

这方面有没有进展?我试图得到相同的信息。我有挂载的服务器的本地名称,但我需要实际的服务器位置。 – 2011-12-15 20:06:55

相关问题