cs_yann1
Messages postés8Date d'inscriptionjeudi 4 avril 2002StatutMembreDernière intervention 3 février 2003
-
17 mai 2002 à 09:31
cs_Zan
Messages postés174Date d'inscriptionjeudi 18 avril 2002StatutMembreDernière intervention25 mai 2006
-
17 mai 2002 à 09:53
j'aimerais trouver le chemin d'un fichier en ne connaissant que son nom. Et s'il n'existe pas , je veux me savoir aussi.
Merci si vous avez des idées.
cs_Zan
Messages postés174Date d'inscriptionjeudi 18 avril 2002StatutMembreDernière intervention25 mai 2006 17 mai 2002 à 09:53
il existe une API
je ne sais pas trop comment elle marche
essaye la:
Private Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (ByVal lpFileName As String, ByVal nBufferLength As Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net
Dim Buffer As String, Ret As Long
'create a buffer
Buffer = Space(255)
'copy the current directory to the buffer and append 'myfile.ext'
Ret = GetFullPathName("myfile.ext", 255, Buffer, "")
'remove the unnecessary chr$(0)'s
Buffer = Left(Buffer, Ret)
'show the result
MsgBox Buffer
End Sub