input "Add # to file name? "; incr open "filename.txt" for input as #1 [Loop] input #1, FileName1$ print "input="; FileName1$ if eof(#1) < 0 then [Stop] if FileName1$ = "end" then [Stop] FileName2$ = lower$(FileName1$) PicNo$ = right$(FileName2$, 8) PicNo = int(val(PicNo$)) + incr if PicNo < 10 then PicNo$ = "000" + str$(PicNo) if PicNo < 100 and PicNo > 9 then PicNo$ = "00" + str$(PicNo) if PicNo < 1000 and PicNo > 99 then PicNo$ = "0" + str$(PicNo) if PicNo < 9999 and PicNo > 999 then PicNo$ = str$(PicNo) 'PicNo$ = "cimg" + PicNo$ + ".jpg" 'PicNo$ = "jrc_" + PicNo$ + ".jpg" PicNo$ = "dsc_" + PicNo$ + ".jpg" 'print PicNo$ FileName2$ = PicNo$ name FileName1$ as FileName2$ print FileName2$ print " " goto [Loop] [Stop] close #1 print "Stop Pgm" end