Bertie, You wouldn't necessarily need to load the files into a vara. You could do something like this in the process tab.
:SET &PPF# = PREP_PROCESS_FILENAME('<SERVER>', 'c:\pictures\*.jpg',,,,'COL=LENGTH','LENGTH_TAB="12=PATH, 100=FILE"')
:PROCESS &PPF#
: SET &FILE# = GET_PROCESS_LINE(&PPF#, FILE)
: PRINT &FILE#
: SET &pnum# = MID(&file#, 2,4)
: PRINT "NEXT LINE IS PNUM"
: PRINT &pnum#
!
MOVE c:\pictures\&FILE# c:\pictures\&PNUM#\
!
:ENDPROCESS
The prep_process_filename will discover the .jpg files in the c:\pictures directory, pull the PNUM that you want, and move them all in one step. No need to load them into a vara unless you have multiple jobs using the files. You could also use the FILELIST vara in place of the PREP_PROCESS_FILENAME and do a prep_process_vara. Both will end up with the same result.