Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the ADIR limit?
Message
De
24/03/2003 16:22:19
Donald Lowrey
Data Technology Corporation
Las Vegas, Nevada, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00769374
Message ID:
00769450
Vues:
26
This message has been marked as a message which has helped to the initial question of the thread.
Edgar

The ADIR limitation may not be such a big handicap. We faced this problem a while back. Although ADIR is fast for a smaller number of files, it seemed to take VFP a noticable period of time to populate a really large array near the limit(64*1024). We had directories with more than 30,000 files; and wound up populating a cursor using WSH. There is some performance penalty but we didn't really have a choice.

You can use this snipet

CREATE CURSOR c_Files ;
(FileName C(29), FileSize I, DateCreated T, ;
LastAccessed T, LastModified T )

oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder(tcFolder)
lnFiles = oFolder.Files.Count

FOR EACH oFile IN oFolder.Files
lcFileName = oFile.Name
lnFileSize = oFile.Size
lddatecreated = oFile.DateCreated
ldlastAccess = oFile.DateLastAccessed
ldlastmodified = oFile.DateLastModified
INSERT INTO c_Files (FileName, FileSize, DateCreated, ;
LastAccessed , LastModified );
VALUES( lcFileName, lnFileSize, ldDateCreated, ;
ldlastAccess, ldlastmodified)
ENDFOR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform