Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid subscript reference
Message
From
30/11/2006 17:25:05
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173721
Message ID:
01173916
Views:
19
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")
*FILECURSOR.PRG
LPARAMETERS m.tcPath, m.tcSkeleton, m.tcExtension, m.tcCursorName
*m.tcPath = "C:\testdir"
*m.tcSkeleton = "*E*"
*m.tcExtension = "*.jpg"
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform