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.
Summary of Contents for Camera
Page 1: ......
Page 2: ...The Canon Camera Hackers Manual ...
Page 3: ......
Page 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Page 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Page 25: ...16 CH APTER 3 ...
Page 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Page 213: ...204 CH APTER 6 ...
Page 253: ...244 AP PENDIX ...