Function MakeDir (strPath) Dim strParentPath, objFSOMkDir Set objFSOMkDir = CreateObject("Scripting.FileSystemObject") strParentPath = objFSOMkDir.GetParentFolderName(strPath) Wscript.echo "Parent folder path : " & strParentPath If Not objFSOMkDir.FolderExists(strParentPath) Then MakeDir strParentPath 'Si le répertoire parent n'existe pas, on fait un appel récursif de la fonction If Not objFSOMkDir.FolderExists(strPath) Then objFSOMkDir.CreateFolder strPath 'Si on est arrivé à cette ligne, c'est que le répertoire parent existe. Si le répertoire à créer n'existe pas, on le cré MakeDir = objFSOMkDir.FolderExists(strPath) Set objFSOMkDir = Nothing End Function