Exit a loop

veddycentveddycent Global Mapper UserPosts: 35
Hi all,

I'm looping through a large directory of about 10,000 files. I need a way to exit out of a directory loop based on a counter or total number of layers in scene.

Here is a snippet from my script. Text in bold is pseudo code of what I was thinking.

DEFINE_VAR NAME="AERIAL_IMAGE_FILES" PROMPT=DIR ABORT_ON_CANCEL=YES PROMPT_TEXT="Location of Aerial Image Files"

DIR_LOOP_START DIRECTORY="%AERIAL_IMAGE_FILES%" FILENAME_MASKS="*.%AERIAL_FILE_FORMAT%" RECURSE_DIR=YES

IMPORT FILENAME="%FNAME_W_DIR%"
LOG_MESSAGE %FNAME_W_DIR%
IF(TOTAL LAYERS > 25)
EXIT LOOP

DIR_LOOP_END

Is this currently possible?

Regards
V
Tagged:
Sign In or Register to comment.