AppleScript的访问网络文件夹 [英] AppleScript access Network Folder
本文介绍了AppleScript的访问网络文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图让我们的网络在我的桌面上的文件夹的备份,但我不知道如何访问共享网络上的文件夹。我的code是如下:
I'm trying to make a backup of a folder on our network to my Desktop but I'm not sure how to access the folder on the shared network. My code is as follows:
on run {input, parameters}
set desktopFolder to "Macintosh HD:Users:James:Desktop:App Backups:"
set todayDate to do shell script "date '+%Y.%m.%d'"
set newFolderName to "Backup " & todayDate
set destinationFolder to desktopFolder & newFolderName
set sourceFolder to "smb://svr01/IT_Department/Design/_team/James/App"
tell application "Finder"
make new folder at alias desktopFolder with properties {name:newFolderName}
copy folder sourceFolder to folder destinationFolder
end tell
return input
end run
我应该使用smb:// ...地址或卷/ ....地址,我应该怎么格式化?我是一个完整的AppleScript新手,顺便!
Should I be using the smb://... address or the Volumes/.... address, and how should I format it? I'm a complete AppleScript novice, by the way!
谢谢
詹姆斯
推荐答案
复制
只复制AppleScript的值,而不是应用程序定义的对象。使用复制
命令。
copy
only copies AppleScript values, not application-defined objects. Use duplicate
command.
set sourceFolder to ("/Users/test/Desktop/untitled folder" as POSIX file)
set targetFolder to ("/Users/test/Desktop/untitled folder 2" as POSIX file)
tell application "Finder" to duplicate sourceFolder to targetFolder
您可以使用SMB:// ...地址
You can use smb://... address.
这篇关于AppleScript的访问网络文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文