Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR not retreiving all directory filenames into DBF
Message
De
28/10/2002 21:01:52
 
 
À
27/10/2002 14:17:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00715886
Message ID:
00716288
Vues:
21
Hi Ed,

Path is:
mHomePhotos_PAW = 'H:\HomePhotos_MLS\'

No subdirectories or hidden files to worry about. Don't need them. I want to retreive the *.jpg files from that directory. In windows explorer that all end .jpg. Total files are less than 600.

Does the number of variables or memory have any thing to do with it?

What about variable count? How do you set it?

Thanks
Roland

===========================================================================
>>Hi,
>>
>>I seem to be having a problem with retrieving ALL filenames & file info into a Dbf using the ADIR() and APPEND command. I use the following code:
>>
>>USE DirPhotos IN 0 ALIAS DP EXCL
>>SELECT DP
>>ZAP
>>
>>DECLARE aDirJpgFiles(1,5)
>>ADIR(aDirJpgFiles,(mHomePhotos_PAW)+'*.JPG')
>>APPEND FROM ARRAY aDirJpgFiles
>>RELEASE aDirJpgFiles
>>BROW
>>
>>Anyone see any problems with the above code? If so, what would be the proper coding or work around?
>
>Depending on what you want, possibly lots. At a minimum, if you are examining a single directory, by default ADIR() will not include files flagged with the "Hidden" or "System" flags - that's easily fixed by adding a third, optional parameter expression, "HS", after the file mask specification. ADIR() by it's nature operates only in the specified directory; it does not recurse subfolders with the file mask, and will not find folders that match the file mask unless there is a "D" in the optional third parameter, and if they are included through the optional parameter, can only be identified as subfolders by inspecting the 5th, attribute, element of the array row for a 'D' in the string.
>
>The full path is not included in the file name, so you'll want to record the path along with the file name when building the list in your table.
>
>File names may be either LFNs or the older 8.3 short name version, largely dependent on how the file specification is done in the shortcut that launches the app. Something to be aware of if you are dependent on one format or the other.
>
>Then there's the issue of some JPEG files having a file type of '.JPEG' rather than '.JPG', and an array size limit of 13,000 file names in a folder if you get some folders with a horrendously large number of JPEGs in them.
>
>There are entries in both the FAQ and Download sections that expand on the functionality of the native ADIR().
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform