Comment déterminer si un chemin est relatif ou absolu dans Visual Basic Script.Comment déterminer si un chemin est relatif ou absolu avec VB Scripting Host
Dans VBA, j'appelle la fonction Win32 api PathIsRelative
Private Declare Function PathIsRelative Lib "shlwapi" _
Alias "PathIsRelativeA" _
(ByVal pszPath As String) As Long
Cependant, il est impossible d'appeler dans une DLL de VBS, donc je ne peux pas utiliser le Win32 api.
René
Je tiens à souligner que le; et // sont à la fois java/c/C++/etc. –
La vérification de la présence d'un deux-points n'est pas suffisante. Par exemple, 'C: \ fichier.txt' est un chemin complet alors que' C: fichier.txt' est relatif (voir http://msdn.microsoft.com/fr-fr/library/aa365247(VS.85). aspx # fully_qualified_vs._relative_paths). – Helen
@Helen: excellente information, merci mais ne peut pas comprendre où ce chemin se rapporte? – Sarfraz