Page 1 sur 1
[R] Informations sur les fichiers
Posté : mar. 29 janv. 2008 14:57
par darkjojo
bonjour, j'aimerais savoir si une commande me permeterais des conaitre les propriété d' un fichier ?
merci d'avance
Re: commande autoit
Posté : mar. 29 janv. 2008 19:45
par sylvanie
quel type de propriétés ?
du genre classique : type fichier, taille, dans ce cas, il y a pas mal de fonction Filegetxxx
ou étendu comme sur certain fichuer exel, doc ... de type auteur...
Re: [..] Informations sur les fichiers
Posté : mer. 30 janv. 2008 00:43
par arrkhan
voila quelques proprietes en vrac, executable tel quel:
$Output = ""
$Output = $Output & "ProductName = " & FileGetVersion ( @AutoItExe , "ProductName" ) & @CRLF
$Output = $Output & "Version = " & FileGetVersion ( @AutoItExe ) & @CRLF
$Output = $Output & "CompanyName = " & FileGetVersion ( @AutoItExe , "CompanyName" ) & @CRLF
$Output = $Output & "LegalCopyright = " & FileGetVersion ( @AutoItExe , "LegalCopyright" ) & @CRLF
$Output = $Output & "LegalTrademarks = " & FileGetVersion ( @AutoItExe , "LegalTrademarks" ) & @CRLF
$Output = $Output & "ProductVersion = " & FileGetVersion ( @AutoItExe , "ProductVersion" ) & @CRLF
$Output = $Output & "FileDescription = " & FileGetVersion ( @AutoItExe , "FileDescription" ) & @CRLF
$Output = $Output & "PrivateBuild = " & FileGetVersion ( @AutoItExe , "PrivateBuild" ) & @CRLF
$Output = $Output & "FileVersion = " & FileGetVersion ( @AutoItExe , "FileVersion" ) & @CRLF
$Output = $Output & "OriginalFilename = " & FileGetVersion ( @AutoItExe , "OriginalFilename" ) & @CRLF
$Output = $Output & "SpecialBuild = " & FileGetVersion ( @AutoItExe , "SpecialBuild" ) & @CRLF
$Output = $Output & "DefaultLangCodepage = " & FileGetVersion ( @AutoItExe , "DefaultLangCodepage" ) & @CRLF
$Output = $Output & "Size = " & Round ( FileGetSize ( @AutoItExe ) / 1024 , 2 ) & " Ko" & @CRLF
$Output = $Output & "Date de création = " & _FrDateFormatLong ( FileGetTime ( @AutoItExe , 1 , 1 ) ) & @CRLF
$Output = $Output & "Date de modification = " & _FrDateFormatLong ( FileGetTime ( @AutoItExe , 0 , 1 ) ) & @CRLF
$Output = $Output & "Dernier accés = " & _FrDateFormatLong ( FileGetTime ( @AutoItExe , 2 , 1 ) ) & @CRLF
MsgBox ( 0 , "" , $Output )
Func _FrDateFormatLong ( $Date )
Return ( StringMid ( $Date , 7 , 2 ) & "/" & _
StringMid ( $Date , 5 , 2 ) & "/" & _
StringLeft ( $Date , 4 ) _
& " " & StringMid ( $Date , 9 , 2 ) & ":" & StringMid ( $Date , 11 , 2 ) & ":" & StringMid ( $Date , 13 , 2 ) )
EndFunc ; == >_FrDateFormatLong
Re: [..] Informations sur les fichiers
Posté : mer. 30 janv. 2008 08:34
par darkjojo
pour répondre a ta question Sylvanie,
les propriété qui m'interessences sont les dates (de creation, modification, ...) d'un fichier open office(.odt)
je vais tester les propriete que ma donner Arrkhan, je vous tiend au courant
et merci pour votre aide
Re: [..] Informations sur les fichiers
Posté : mer. 30 janv. 2008 11:39
par darkjojo
merci pour tous

, ça marche et c'est pile poil ce que je veux
maintenant j'attaque la partis sport du scripte : avoir tout ces informations de tout les fichier .odt d'un poste, sachant que je ne connais ni les nom des fichiers, ni ou il se trouve. le tous rassembler dans un fichier texte.
Re: [R] Informations sur les fichiers
Posté : mer. 30 janv. 2008 15:01
par Tlem
Bonjour.
Pour la suite de votre script, je vous conseil l'utilisation de l'UDF _FileListToArrayNew2h.au3 suivez ce lien :
http://www.autoitscript.fr/viewtopic.php?f=6&t=479
Une fois votre tableau obtenu, vous n'avez plus qu'a le parcourir avec une boucle de type
'FOR', et récupérer les informations de chaque fichier au fur et à mesure.
Comme vous avez le chemin + le nom des fichiers ainsi que les infos des dates, vous n'avez qu'à les enregistrer dans le fichier texte à chaque élément de la boucle.
Re: [R] Informations sur les fichiers
Posté : jeu. 31 janv. 2008 08:31
par darkjojo
merci beaucoup j'essaye tous de suite