bonjour a tous
je cherche a faire extraire une chaîne a partir d'un chemin
j'ai ce chemin réseau
'\\A1-srv\reprise-soll\Allian_ged\NOVAXEL\ALLIAN_2\CAL043329\Tord Assurance Automobile\FORP09969\documents entrants\Relevé d'information_20258150.pdf'
et j'ai besoin d'extrait le mot TORP09969 de la totalité du chaîne
je sait que que je dois travailler avec sunstring + indexof sauf que j'arrive la chaîne '\' sur la position 9
merci pour vos aides
1 2 3
| $i ='\\A1-srv\reprise-soll\Allian_ged\NOVAXEL\ALLIAN_2\CAL043329\Tord Assurance Automobile\FORP09969\documents entrants\Relevé d'information_20258150.pdf'
$f=$i.substring(1,$i.indexof("\\"))
write-host $f |
cordialement
Partager