EasyManua.ls Logo

Canon Camera - Page 158

Canon Camera
257 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5.7 Example scripts 149
wait_click(5000)
if is_pressed("set") then
break
elseif
is_pressed("display") then
i = nil
break
elseif is_pressed("left") then
i = i - 1
if i <= 0 then
i = #files
end
elseif is_pressed("right") then
i = i + 1
if i > #files then
i = 1
end
end
end
If the user selected a subfolder, the members of the subfolder are fetched
and the renameFile() function is executed on each member.
if i then
path = root.."/"..files[i]
files, msg =
os.listdir(path, false)
if not files then
error(msg)
elseif not files[1] then
error("Folder is empty")
end
path = path.."/"
for _, file in ipairs(files) do
renameFile(path, file)
end
end
Of course, you could easily modify this script to implement your own num-
bering scheme. Before trying out this (or your own) script, you should
definitely make a backup copy of your memory card.

Table of Contents

Related product manuals