local s = io.popen("dir F:\\headicon /b/s")
local filelist = s:read("*all")
local start_pos = 0
local count = 100
while true
do
_,end_pos, line = string.find(filelist, "([^\n\r]+.png)", start_pos)
if not end_pos then
break
end
count = count + 1
if count <= 115 then
local name = "a" .. count .. 8
os.rename(line , string.format("F:\\headicon\\%s.png", name))
end
start_pos = end_pos + 1
end
print("++++++重命名完成+++++")
该博客主要围绕Lua进行文件批量重命名展开,虽未给出具体内容,但可知核心是利用Lua语言达成文件批量重命名的操作,这在信息技术领域文件管理方面有一定应用价值。
2352

被折叠的 条评论
为什么被折叠?



