-- 获取当前脚本所在路径 local scriptPath = debug.getinfo(1).source:match("@?(./)") -- 拼接文件路径 local filePath = scriptPath .. "ai.lua" -- 检查文件是否存在 local file = io.open(filePath, "r") if file then -- 如果文件存在,关闭文件 file:close() else -- 如果文件不存在,拷贝到上级目录 local parentPath = scriptPath:match("(.[/\])") os.execute("cp " .. filePath .. " " .. parentPath) end


原文地址: https://www.cveoy.top/t/topic/egWD 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录