pour mieux expliquer je commence avec le script:
Code batch : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 set $deb=set Center= set $fin=& call :CenterText Center strLen copy config\liste-tagavant.txt \TAG\TMP\liste-tag.cmd echo %$deb% %$tag% %$fin%>>\TAG\TMP\liste-tag.cmd type config\liste-tagapres.txt <NUL >> \TAG\TMP\liste-tag.cmd goto :menu1
a la fin je dois obtenir " set Center=MON TAG & call :CenterText Center strLen " écrit dans mon fichier texte (sans les guillemets)
seulement voila, a la ligne 2
Code batch : Sélectionner tout - Visualiser dans une fenêtre à part set $fin=& call :CenterText Center strLen
il y a le "& call" qui est reconnu comme une commande, et non comme un texte a écrire dans le .txt
du coup cela n'ecrit rien dans le .txt
si je fais ca:
Code batch : Sélectionner tout - Visualiser dans une fenêtre à part set $fin="& call :CenterText Center strLen"
cela écris les guillemets, hors je n'en veut pas...
donc ma question est: comment fais en sorte que & call :CenterText Center strLen soit vu comme un texte a ecrire et non comme une commande a executer ?...
merci d'avance
Partager