Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid subscript reference
Message
 
 
À
30/11/2006 17:25:05
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01173721
Message ID:
01174063
Vues:
11
Yes, I saw this message, but it's slow on a big directories.

>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
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform