Recherche des résultats commençant par ... et finissant par n'importe quoi

Résolu
cs_yonel Messages postés 7 Date d'inscription mardi 1 avril 2003 Statut Membre Dernière intervention 8 novembre 2006 - 27 oct. 2005 à 10:35
cs_yonel Messages postés 7 Date d'inscription mardi 1 avril 2003 Statut Membre Dernière intervention 8 novembre 2006 - 2 nov. 2005 à 09:16
Bonjour.
Voici mon code: je liste la totalité des répertoires, mais après je ne veux garder que ceux qui commence par ISTP_E (il y a ISTP_E2003, ISTP_E2004, ISTP_E2005, ...)
Comment dois-je faire pour filtrer?
Merci

<%
Dim oFSO
Dim oFileItem
Dim oFolder
Dim oSubFolder
Dim oDrive
Dim CurrentPath

Set oFSO = CreateObject("Scripting.FileSystemObject")

CurrentPath = "X:\Plannings"

Set oFolder = oFSO.GetFolder(CurrentPath)
Set oFolderContents = oFolder.Files
For Each oSubFolder in oFolder.SubFolders
'if oSubFolder.Name = "ISTP_E...." then
%>
Folder.gif">

<%= espace %>&promo=<%= Replace(oSubFolder.Name," ","+") %> class="soustitrebleu">
<%= oSubFolder.Name %>


<%
'end if
Next
%>
A voir également:

2 réponses

cs_Yopyop Messages postés 586 Date d'inscription lundi 7 janvier 2002 Statut Membre Dernière intervention 10 février 2010 1
30 oct. 2005 à 15:49
re,

Tu peux essayer

If Left(oSubFolder.Name,6)="ISTP_E" Then

yopyop
3
cs_yonel Messages postés 7 Date d'inscription mardi 1 avril 2003 Statut Membre Dernière intervention 8 novembre 2006
2 nov. 2005 à 09:16
Merci beaucoup ça marche!
0
Rejoignez-nous