SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Determiner si un dossier existe

Accueil > Script > maintenance > Determiner si un dossier existe

Determiner si un dossier existe

Par Alexandre WETTA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 13/05/2005 vers 13h.

Set objNetwork = CreateObject("Wscript.Network")
strUser = objNetwork.UserName

strPath = "C:\Documents and Settings\" & strUser & "\Application Data\Microsoft\Templates"

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FolderExists(strPath) Then
Wscript.Echo "The folder exists."
Else
Wscript.Echo "The folder does not exist."
End If


Pour changer le chemin du dossier, changer ceci:
"C:\Documents and Settings\" & strUser & "\Application Data\Microsoft\Templates"

Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
1

Visites :
11655

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft