Bonjour, je suis en VbScript, et je veut lister tous les fichiers qui finissent par ISO
pour l'instant j'ai écrit ça
Mais j'ai une erreur sur cette ligne if regEx.Test(fichier.name ) then
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 Sub iniMenuIso Dim regEx , occurrences Dim fso, fichier, fileItem Dim i, imax, z, valeur, cible, liste Dim client Set fso = CreateObject("Scripting.FileSystemObject") Set regEx = New RegExp regEx.Pattern = "*\.[iso]$" 'début de l'énumération For Each client in getListeClient() For Each fichier In fso.GetFolder(path & "\" & client & "\").Files if regEx.Test(fichier.name ) then msgbox fichier.name End If Next Next End Sub
Qui me dit Quantificateur inattendu. Je ne comprend pas pourquoi et je ne maitrise pas bien les regexs.
Connaissez vous sinon un autre moyen de parvenir à ce résultat
Partager