Hey Naomi
>I proposed to try to move files to another new folder, delete the old folder and rename this one.
>
>We also think, we may create a file at night, then during the day have an option to add files if necessary.
>
>Anyway, that's not an easy problem as it seemed to be originally. For now he suggested to add an extra check for mask in the returned list.
Try this please:
CREATE CURSOR cFiles (cFileName c(128))
?filecursor("c:\testdir","*G*","*.jpg","cFiles")
LPARAMETERS m.tcPath, m.tcSkeleton, m.tcExtension, m.tcCursorName
LOCAL m.lcFile
m.lcFile = SYS(2000,ADDBS(m.tcPath) + m.tcExtension)
m.lnI = 0
DO WHILE NOT EMPTY(m.lcFile)
IF LIKE(m.tcSkeleton,JUSTSTEM(m.lcFile))
INSERT INTO (m.tcCursorName) ;
(cFileName) ;
VALUES ;
(m.lcFile)
m.lnI = m.lnI + 1
ENDIF
m.lcFile=SYS(2000,ADDBS(m.tcPath) + m.tcExtension,1)
ENDDO
RETURN m.lnI