continue

Syntax continue

Action Skips the remaining statements in the body of the current for, loop, fileloop, or while statement. Script execution continues with the next iteration of the looping construct, after incrementing the counter (in a for statement), executing the loop

iteration expression (in a loop statement), or assigning the next file (in a fileloop statement).

Examples fileloop (fName in folderPath)
if file.isFolder (fName) // skip folders

continue

if file.isLocked (fName)

...

if file.size (fName) > 20000

...

(This is a script fragment; do not try to execute it in the Quick Script Window.) In this example, the use of the continue statement avoids having to indent the remainder of the loop body under an if statement. Typically, the continue statement will be
used when there is more complex logic involved.

See Also for

fileloop

loop

while

break

Discuss