使用 Applescript 将下载内容复制到新创建的文件夹

Copy contents of Downloads to newly created folder with Applescript

我有下面的代码,可以将下载内容复制到桌面。我想做的是将它复制到新创建的文件夹 folder_name,这是当前日期和时间。

set folder_name to (current date)
set folder_name to folder_name as string

tell application "Finder"
    set p to path to desktop
    make new folder at p with properties {name:folder_name}
end tell

tell application "Finder"
    move (files of alias "Macintosh HD:Users:XXXXX:Downloads") to desktop
end tell

基本上,我不确定如何将 folder_name 传递到最终路径。我试过了 (desktop & folder_name)

谢谢

Finder make new folder 命令 returns 新建文件夹。

并且存在当前用户下载文件夹的相对路径

set currentDate to (current date) as string
set downloadsFolder to path to downloads folder

tell application "Finder"
    set currentFolder to make new folder at desktop with properties {name: currentDate}
    move (files of downloadsFolder) to currentFolder
end tell