Résultat script vbs vers fichier txt
Bonjour,
Je tente de sortir le résultat du script suivant dans un fichier txt :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Sub ControleDisque()
Dim stRep 'Nom du répertoire à parcourir
Dim oFSO, oFld
Dim fso, f
Set oFSO = CreateObject("Scripting.FileSystemObject")
stRep = "\\Plume\data"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("ControleDisque.txt",2,true)
Set oFld = oFSO.GetFolder(stRep)
For Each oFld In oFSO.GetFolder(stRep).SubFolders
Wscript.Echo "Size :" & oFld.Size & vbCrLf & _
f.Write size
Next
f.close
End Sub |
Cependant, j'obtient l'erreur suivante lors de son exécution :
Citation:
Ligne 12
Caractère 9
Fin d'instruction attendue
Code erreur 800a0401
Etant novice en vbscript, est-ce que quelqu'un pourrait me donner un coup de main?
Merci d'avance.:roll: