将文件夹名称附加到applescript中的路径变量?

时间:2010-07-26 19:40:21

标签: macos applescript

set fold to "/Users/Test/Desktop/"
set file to "/Myfolder/Hi.txt"

如何将这两个变量连接起来,将文件路径设为“/Users/Test/Desktop//Myfolder/Hi.txt”?

2 个答案:

答案 0 :(得分:5)

这里你去了

  set aFile to (the POSIX path of (path to desktop)) & "Myfolder/Hi.txt"

答案 1 :(得分:1)

使用Concatenation operator加入字符串:

set the folderPath to "/Users/Test/Desktop/"
set the filePath to "/Myfolder/Hi.txt"
set the fullPath to folderPath & filePath