Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File 创建文件夹移动文件-Applescript_File_Makefile_Applescript_Directory - Fatal编程技术网

File 创建文件夹移动文件-Applescript

File 创建文件夹移动文件-Applescript,file,makefile,applescript,directory,File,Makefile,Applescript,Directory,我希望: 从桌面移动文件夹 1a。创建一个文件夹,其中将作业名称设置为返回的文本(显示对话框“请输入作业名称:”默认答案“作业名称”) 1b。将文件夹从桌面拖放到在newfo创建新文件夹,属性为{name:“Emails”} 脚本: set jobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name") set loc to choose folder "Cho

我希望:

  • 从桌面移动文件夹

    1a。创建一个文件夹,其中将作业名称设置为返回的文本(显示对话框“请输入作业名称:”默认答案“作业名称”)

    1b。将文件夹从桌面拖放到在newfo创建新文件夹,属性为{name:“Emails”}

  • 脚本:

    set jobName to text returned of (display dialog "Please enter Job Name:" default     answer "Job_Name")
    set loc to choose folder "Choose Parent Folder Location"
    
    tell application "Finder"
    set home_path to home as text
    set source to alias (home_path & "Desktop:WorkingFolder")
    set newfo to make new folder at loc with properties {name:jobName}
        make new folder at newfo with properties {name:"Emails"}
    
    set destination to home_path & jobName
    
    tell application "Finder" to duplicate source to destination with replacing
    end tell
    

    任何帮助都将不胜感激。谢谢你,这就是你想要达到的目标吗

        set jobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
    set loc to choose folder with prompt "Choose Parent Folder Location"
    
    tell application "Finder"
        set source to alias ((path to desktop as text) & "WorkingFolder:")
        set newfo to make new folder at loc with properties {name:jobName}
        make new folder at newfo with properties {name:"Emails"}
        set destination to make new folder at (path to home folder) with properties {name:jobName}
        tell application "Finder" to duplicate source to destination with replacing
    end tell
    

    对差不多。。希望在根目录中有“屏幕截图”文件夹。所以不要将其添加到我创建的文件夹中,而是将内容添加到“屏幕截图”文件夹中@craigsmithI想知道你为什么使用主目录。很抱歉把截图留在这里。请查看编辑的脚本是否更接近。欢迎使用。你介意把这个作为答案吗?