Dim stRep 'c:\QUEUS\cro\rebut
Dim oFSO,oFl
Set oFSO = CreateObject("Scripting.FileSystemObject")
stRep = "C:\Tmp"
If oFSO.FolderExists(stRep) Then
For each oFl in oFSO.GetFolder(stRep).Files
Wscript.Echo oFl.Name
Next
End If
Const ForReading = 1, ForWriting = 2
Dim oFso, f
Set oFso = CreateObject("Scripting.FileSystemObject")
Set f = oFso.OpenTextFile("c:\QUEUS\cro\rebut", ForReading)
Wscript.echo f.ReadAll
f.Close
pos = InStr(4, "na") 'renvoie 24
pos = InStr(27,"na) 'renvoie 0
File.Delete("c:\QUEUS\cro\rebut")
Console.WriteLine("Fichier c:\QUEUS\cro\rebut supprimé")
mon code marche pas ce code et sensé faire
x= exemple
Qu'il aille dans c:\QUEUS\cro\rebut et que les fichier qu'il y a dans x il les regarde un par un et supprime les fichiers contenant les mot "xxxxxx" .
Merci d'avance :)