我正在尝试编写一个简单的applescript来将文件内容移动到应用程序的package contents文件夹中。我尝试使用automator来做这件事,但我无法访问应用程序的包内容。我对applescript非常陌生,但这就是我到目前为止所写的。
tell application "Finder"
set source_folder to (choose folder with prompt "Select the Step5 Folder:")
set target_folder to folder "MacintoshHD:Applications:BlueJ.app:Contents:Resources:Java:userlib"
copy every file in folder source_folder to folder target_folder
end tell现在我得到了以下错误
“查找程序遇到错误:无法将启动盘的文件夹\"Applications\”的文件夹\"BlueJ.app\“的文件夹\"Resources\”的文件夹\“Resources\”的文件夹\"userlib\“的文件夹\”userlib\“转换为整数类型。”从启动盘"Applications“文件夹"BlueJ.app”的应用程序文件"Contents“的"Resources”文件夹的“Resources”文件夹的"userlib“文件夹中的”userlib“文件夹到整数
我试着用谷歌搜索这个错误,但我没有找到任何适用于我所写的内容的东西。
谢谢
发布于 2014-06-04 01:35:48
尝试:
set source_folder to (choose folder with prompt "Select the Step5 Folder:")
set target_folder to "MacintoshHD:Applications:BlueJ.app:Contents:Resources:Java:userlib"
tell application "Finder" to duplicate files of source_folder to target_folder发布于 2014-06-04 01:57:58
您指定了两次“文件夹”...错误是因为将文件移动到:文件夹路径
https://stackoverflow.com/questions/24019945
复制相似问题