Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Function to get Type File
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00664556
Message ID:
00664678
Vues:
23
>>>Hi:
>>>
>>>What API function I need to get the type of a file ?
>>>For example, in Microsoft Explorer, the columns at the right side of the window folder, show the files in the folder organized in columns as "name", "size", "type", "modified", etc.
>>>
>>>I need to retrive from a file the "type" string, for example:
>>>"Application", "Configuration Settings","File Folder", "Bitmap image", etc.
>>>
>>>Thanks.
>>
>>If the Windows Script Host is an option, it's the easiest
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>* lcfile is the file of interest
>>oFile = oFSO.GetFile(lcfile)
>>? oFile.Type
>
>Great!
>Thank you George.
>Do you know where can I find documentation about WSH ?
>
>Thank again.

I sure do know where you can find some documentation on it. I'd start by directing you to the series of articles that Ed Rauh and I wrote for the VFUG (www.vfug.org) newsletter. The articles, which began in September, 2000 and ended with the March, 2001 issues, emphasize putting the WSH to use from inside of VFP. IOW, the things you can already do easily from VFP that are in the WSH, aren't covered. Only the most useful functionality. These are available on-line at the VFUG web site.

Ed has a series of links in his sig block to informative WSH sites. Additionally, there's Dino Esposito's Windows Script Host Programmers Reference from Wrox Press. It is, however, written from a VBScript/JScript perspective, as are the various topics you can find in the MSDN Library or site.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform