Quote:
Originally Posted by BigFan
When interacting with DOPUS, many commands deliver the selected or unselected
contant as a single string. Depending on how many files and directories are
retrieved, this string becomes very, very long.
|
If a script has to iterate through all the selected files in a Directory Opus 4 lister, I usually used a different approach:
Code:
status 9 <active_lister_number> /* # of selected files */
no_of_files = result
do no_of_files
getnextselected <active_lister_number>
current_file = result
/* do something with the file here */
selectfile '"' current_file '" 0 1' /* 0 = deselect, 1 = immediately update display */
end
It is slightly slower, but behaves like the internal DOpus functions do - i.e. it works on the first selected file, then deselects it, then works on the next file. If you abort, all the unprocessed files are still selected.