Aide:FileGetVersion.txt

De Wiki AutoIt Français
Aller à : navigation, rechercher

Document original V3.3.6.1 :

###Function###
FileGetVersion

###Description###
Returns the "File" version information.

###Syntax###
FileGetVersion ( "filename" [,"stringname"] )


###Parameters###
@@ParamTable@@
filename
	Filename to check.
stringname
	[optional] name of the field to be retrieved from the header version file info.
@@End@@


###ReturnValue###
@@ReturnTable@@
Success:	Returns a string containing the version information, e.g. "3.0.81.0".
Failure:	Returns "0.0.0.0" if no version information (or other error) or "" when retrieving a stringname, and sets @error to 1.
@@End@@


###Remarks###
stringname can be the basic one as :
Comments, InternalName, ProductName, CompanyName, LegalCopyright, ProductVersion, 
FileDescription, LegalTrademarks, PrivateBuild, FileVersion, OriginalFilename, SpecialBuild

Or a special one "CompiledScript" which is set for a compiled script. FileGetVersion(@AutoItExe, "CompiledScript") will return "AutoIt v3 Script : 3, 2, 1, 2".

Another special stringname is "DefaultLangCodepage" can be used to retrieve the default language and codepage.

The language and codepage can be used if needed to differentiate the "stringname" i.e. "080904b0\Comments" (see MSDN StringFileInfo in VerQueryValue function).


###Related###
FileGetSize, FileGetTime


###Example###
@@IncludeExample@@


Document traduit V3.3.6.1 :

###Function###
FileGetVersion

###Description###
Retourne les informations de version d'un Fichier.


###Syntax###
FileGetVersion ( "filename" [,"stringname"] )


###Parameters###
@@ParamTable@@
filename
	Nom du fichier à vérifier.
stringname
	[optionnel] Nom du champ à récupérer dans l'en-tête d'information de version du fichier.
@@End@@


###ReturnValue###
@@ReturnTable@@
Succès:	Retourne une chaîne contenant les informations de version, par exemple: "3.0.81.0".
Échec:	Retourne "0.0.0.0" si aucune information de version (ou autre erreur) ou "" lors de la récupération d'un nom de chaîne , et met @error à 1.
@@End@@


###Remarks###
Le nom de chaîne peut être simplement:
Comments, InternalName, ProductName, CompanyName, LegalCopyright, ProductVersion,
FileDescription, LegalTrademarks, PrivateBuild, FileVersion, OriginalFilename, SpecialBuild

Ou un spécial "CompiledScript", qui est fixé pour un script compilé. FileGetVersion (@AutoItExe, "CompiledScript") retournera "AutoIt v3 Script : 3,3,6,1".

Un autre nom de chaîne spécial est «DefaultLangCodepage" qui peut être utilisé pour récupérer la langue par défaut et les pages de code.

La langue et les pages de code peuvent être utilisés si nécessaire pour différencier les "stringname" (noms de chaîne) exemple : "080904b0\Comments" (voir StringFileInfo dans la fonction VerQueryValue sur le MSDN).


###Related###
<a href="FileGetSize.htm">FileGetSize</a>, <a href="FileGetTime.htm">FileGetTime</a>


###Example###
@@IncludeExample@@


Traducteur :TT22