关于 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"

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

不过一样完成任务.

原文地址:https://www.cnblogs.com/3dxy/p/3966352.html