voila le résulta:
cette fois ci cela devrait être bon :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name) Next
Mais ca fait un autre probléme, a la deuxième ligne il n'y a que commande dos a la place de batch\commande dos
En fait j'ai été un peu con
Je me suis dit : "N'oublis pas le moins 1" et je l'ai oublié
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name) Next
Je crois que je vais m'arracher les cheveux.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Mais on n'est pas loin du truc.
Cela donne koi ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") vrChmCourt = Replace(url,urlrepertoire & "\","") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Essaye ceci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire & "\","") vrChmCourt = Replace(url,urlrepertoire,"") vrChmCourt = Replace(url, "\\","") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Et ceci ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 'vrChmCourt = Replace(url,urlrepertoire & "\","") vrChmCourt = Replace(url, "\\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire & "\","") vrChmCourt = Replace(url,urlrepertoire,"") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Bon cela devrait être meilleur mais pas parfait.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 'vrChmCourt = Replace(url,urlrepertoire & "\","") vrChmCourt = Replace(url, "\\","") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") vrChmCourt = Replace(url,urlrepertoire & "\","") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
On y reréflichieras lundi.
On va reprendre ce code et faire un peu autrement.
heu ouias mais je suis un peu con :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 'vrChmCourt = Replace(url,urlrepertoire & "\","") vrChmCourt = Replace(url, "\\","\") For Each fdCur In fd.SubFolders Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") vrChmCourt = Replace(url,urlrepertoire & "\","") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Mais non tu n'est pas con
Le résulta et identique au précéden
un dernier :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 'vrChmCourt = Replace(url,urlrepertoire & "\","") For Each fdCur In fd.SubFolders vrChmCourt = Replace(url, "\\","\") Set f = fso.OpenTextFile(urlrepertoire & "\index.htm", 8,true) f.writeline("<a href=""" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name & "\index.htm"">" & Right(vrChmCourt, Len(vrChmCourt)) & fdCur.Name &"</a> <br>") 'changement ici :) f.close vrChmCourt = Replace(url,urlrepertoire,"") vrChmCourt = Replace(url,urlrepertoire & "\","") 'vrChmCourt = vrChmCourt & "\" traiterepertoire(url & "\" & fdCur.Name & "\") Next
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager