Renvoie la lettre du lecteur sur lequel réside le fichier ou le dossier spécifié. Lecture seule.
object.Drive
L'argument object représente toujours un objet File ou Folder.
Le code suivant illustre l'emploi de la propriété Drive :
Function ShowFileAccessInfo(filespec)
Dim fso, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
s = f.Name & " sur le lecteur " & UCase(f.Drive) & "<BR>"
s = s & "Créé le: " & f.DateCreated & "<BR>"
s = s & "Dernier accès le: " & f.DateLastAccessed & "<BR>"
s = s & "Dernière modification le: " & f.DateLastModified
ShowFileAccessInfo = s
End Function
Attributes, propriété | DateCreated, propriété | DateLastAccessed, propriété | DateLastModified, propriété | Files, propriété | IsRootFolder, propriété | Name, propriété | ParentFolder, propriété | Path, propriété | ShortName, propriété | ShortPath, propriété | Size, propriété | SubFolders, propriété | Type, propriété
Application: File, objet | Folder, objet