Renvoie le chemin d'un fichier, dossier ou lecteur spécifié.
object.Path
L'argument object représente toujours un objet File, Folder ou Drive.
Pour les lettres de lecteur, la racine ne figure pas. Par exemple, le chemin du lecteur C est C:, et non pas C:\.
Le code suivant illustre l'emploi de la propriété Path avec un objet File :
Function ShowFileAccessInfo(filespec)
Dim fso, d, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
s = UCase(f.Path) & "<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é | AvailableSpace, propriété | DateCreated, propriété | DateLastAccessed, propriété | DateLastModified, propriété | Drive, propriété | DriveLetter, propriété | DriveType, propriété | Files, propriété | FileSystem, propriété | FreeSpace, propriété | IsReady, propriété | IsRootFolder, propriété | Name, propriété | ParentFolder, propriété | RootFolder, propriété | SerialNumber, propriété | ShareName, propriété | ShortName, propriété | ShortPath, propriété | Size, propriété | SubFolders, propriété | TotalSize, propriété | Type, propriété | VolumeName, propriété
Application: Drive, objet | File, objet | Folder, objet