gpt4 book ai didi

applescript - 使用 Applescript 打开用户的库文件夹

转载 作者:行者123 更新时间:2023-12-05 02:23:17 30 4
gpt4 key购买 nike

我想打开一个默认为应用程序设置文件夹的文件夹:

/Users/XXX/Library/Application Support/Tunnelblick/Configurations

我不想“硬编码”“XXX”。

/library 文件夹:

set theDestination to (choose folder with prompt "Open destination folder" default location (path to library folder))

home 文件夹:

set theDestination to (choose folder with prompt "Open destination folder" default location (path to home folder))

我不确定如何获取 ~/Library 文件夹及其子文件夹之一。

最佳答案

库的路径是:

POSIX path of (path to library folder from user domain)

=~/图书馆/

POSIX path of (path to library folder from local domain)

=/图书馆/

POSIX path of (path to library folder from system domain)

=/系统/库/

关于applescript - 使用 Applescript 打开用户的库文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23632885/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com