Canon Camera Hackers Manual page 158

Camera hackers manual berthold daum
Table of Contents

Advertisement

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.
5.7 Example scripts
149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Powershot sx10 is

Table of Contents