Can';在applescript中将应用程序文件的文件夹转换为整数

Can';在applescript中将应用程序文件的文件夹转换为整数,applescript,Applescript,我正在尝试编写一个简单的applescript,将文件内容移动到应用程序的PackageContents文件夹中。我尝试使用automator来完成此操作,但无法访问应用程序的包内容。我对applescript很陌生,但这是我到目前为止写的 tell application "Finder" set source_folder to (choose folder with prompt "Select the Step5 Folder:") set target_folder to

我正在尝试编写一个简单的applescript,将文件内容移动到应用程序的PackageContents文件夹中。我尝试使用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
现在我得到了以下错误

错误“Finder出现错误:无法将应用程序文件“BlueJ.app”的文件夹“Applications”的文件夹“Resources”的文件夹“Contents”的文件夹“Java”的文件夹“Resources”的文件夹“userlib”的文件夹“userlib”的文件夹“userlib”的启动盘的文件夹“Applications”的文件夹“Contents”的文件夹“Resources”的文件夹“Resources”的文件夹“userlib”的文件夹“userlib”的文件夹“userlib”的编号为-1700启动盘文件夹“Applications”的“BlueJ.app”改为整数

我试着用谷歌搜索错误,但没有发现任何适用于我所写内容的东西

谢谢

试试:

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

您指定了两次“folder”…错误是将文件移动到:folder folder path

user3703869使用“复制”而不是“复制”时出错。