代号小一

看不到子标题【表情】

导航

关于 MAXScript 如何剪切文件夹

MAXScript 中可以对文件进行创建删除复制等操作但是唯独不能删除文件夹...

网上搜了一下批处理的剪切方法,在 MAXScript 里调用一下就好了

fn xcopy oldfile newfile =
(
    newfilepath = newfile + "\\" + getFilenameFile oldfile
    xcopy_cmd = "xcopy /s /e /i /y " + oldfile + " " + newfilepath + " &&rd /s /q " + oldfile
    doscommand (xcopy_cmd as string)
--     print xcopy_cmd
    )
xcopy "C:\abc" "E:\123"

其实上面的批处理不是真正意义上的剪切,而是把文件复制到指定位置后删除原文件夹.

不过一样完成任务.

posted on 2014-09-11 14:11  代号小一  阅读(639)  评论(0编辑  收藏  举报