Path Applescript:仅使用它移动文件';s路径

Path Applescript:仅使用它移动文件';s路径,path,applescript,directory,file-move,Path,Applescript,Directory,File Move,多亏了Stack Overflow上的人的帮助,我正在使用Applescript开发一个巨大的程序,但是我被困在了一个新文件夹中,我正在尝试将两个illustrator文件移动到其中。通常情况下,这不会是一个问题,因为我在用“选择”选择它们之后移动了文件,但这次我没有选择它们我只有带有完整路径的变量。 所以我的问题是如何使用这两个文件的完整路径移动它们? 我能否以某种方式将变量转换为更易于管理的格式 这是代码中不起作用的部分(完整的内容非常庞大,但如果需要,我可以发布),以及一些变量值来源的代码

多亏了Stack Overflow上的人的帮助,我正在使用Applescript开发一个巨大的程序,但是我被困在了一个新文件夹中,我正在尝试将两个illustrator文件移动到其中。通常情况下,这不会是一个问题,因为我在用“选择”选择它们之后移动了文件,但这次我没有选择它们我只有带有完整路径的变量。

所以我的问题是如何使用这两个文件的完整路径移动它们? 我能否以某种方式将变量转换为更易于管理的格式

这是代码中不起作用的部分(完整的内容非常庞大,但如果需要,我可以发布),以及一些变量值来源的代码片段

 set saveLocation to ((path to desktop) as string) --place to save the files
 set theFile to choose file --choose .ai file to get outlines on
tell application "Finder" to set fileName to name of theFile
set fullPath to (saveLocation & fileName) --file path of new .ai

make new folder at saveLocation with properties {name:(text 1 thru ((length of fileName) - 3) of fileName)}
tell current application
    set newFolder to POSIX path of saveLocation
    set newFolder to newFolder & (text 1 thru ((length of fileName) - 3) of fileName)

*--set newFolder to choose folder* -- I tested to see if manually selecting the new folder helped, it didn't

 move fullPath to newFolder

我真的非常感谢您的帮助,提前谢谢您

非常简单,请将make文件夹设置为一个变量,以便稍后调用。看起来像这样:

tell app "finder" --need to use Finder to move files
    set somevariable to make new folder at saveLocation with properties {name:(text 1 thru ((length of fileName) - 3) of fileName)}
    move file fullPath to folder somevariable
end tell
非常感谢:)我本来应该能够自己解决这个问题的,但当时我的脑子已经死了:p