<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>29 Oct 2025 09:58:03 Z</lastBuildDate><pubDate>28 Oct 2025 11:39:52 Z</pubDate><description>Bonjour les copains,&#13;
Je veux compter le nombre de lignes d'un très volumineux fichier (&gt;&gt; 4 MM lignes, au moins).&#13;
Je veux utiliser pour cela une instruction dos très simple et très rapide :&#13;
C:\Windows\System32\cmd.exe /u /c find /c /v  "" + le chemin du fichier à analyser&#13;
&#13;
Dans mon cas :&#13;
Str_LigneCommande = "C:\Windows\System32\cmd.exe /u /c find /c /v " + caract(34) + caract(34) + " " + Str_NomFichier&#13;
&#13;
C'est l'instruction de lecture qui se passe mal, elle me donne une chaine de retour vide.&#13;
&#13;
Str_Sortie	est une chaîne = MaCommandeAExécuter.LitSortieStandard(Vrai)&#13;
&#13;
Quelqu'un d'entre vous a t il déjà fait marcher un truc pareil ?&#13;
&#13;
Je vous donne comme info sup que la ligne de commande qui est enregistrée dans la variable Str_LigneCommande, lorsque j'ouvre la console et que je l'exécute, elle me donne le bon résultat !&#13;
&#13;
Microsoft Windows [version 10.0.26200.6901]&#13;
(c) Microsoft Corporation. Tous droits réservés.&#13;
C:\Users\Admin&gt;C:\Windows\System32\cmd.exe /u /c find /c /v "" "R:\@prenoms-2023-dpt.csv"&#13;
---------- R:\@PRENOMS-2023-DPT.CSV: 3884324&#13;
C:\Users\Admin&gt;&#13;
&#13;
[code:wl]&#13;
Str_Commande est une chaîne = "/u /c find /c /v " + Caract(34) + Caract(34) +" " + Caract(34) + Str_CheminFichier + Caract(34)&#13;
MaCommandeAExécuter est une Commande&#13;
// Exécutable à lancer&#13;
MaCommandeAExécuter.Exécutable	= "C:\Windows\System32\cmd.exe"&#13;
MaCommandeAExécuter.Arguments = Str_Commande&#13;
// Activation des flux&#13;
MaCommandeAExécuter.Flux = cmdSortieStandard&#13;
// Exécution de la commande&#13;
Bool_Resultat = CmdExécute(MaCommandeAExécuter, Vrai)&#13;
SI Bool_Resultat ALORS&#13;
	Str_Sortie	est une chaîne	= MaCommandeAExécuter.LitSortieStandard(Vrai)&#13;
	SI (Str_Sortie&lt;&gt; "") ALORS&#13;
		I_NbreLigne	 = Val(SansEspace(ExtraitChaîne(Str_Sortie, -1, ":")))&#13;
	SINON&#13;
		Info("Pas de ligne détectée par la fonction cmd")&#13;
	FIN&#13;
SINON&#13;
	Info("Erreur lors de l'exécution de la commande","cmd " + Str_Commande)&#13;
FIN&#13;
RENVOYER I_NbreLigne&#13;
[/code]&#13;
&#13;
Ici, Str_Sortie est toujours vide...... ;(&#13;
&#13;
Un grand merci à vous d'avoir lu jusqu'ici !&#13;
Bernard</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd/read.awp</link><title>Envoie d'une commande au DOS (CMD)</title><managingEditor>moderateur@pcsoft.fr (The moderator)</managingEditor><webMaster>webmaster@pcsoft.fr (The webmaster)</webMaster><item><author>AlexisPERR</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278220/read.awp</comments><pubDate>29 Oct 2025 09:58:03 Z</pubDate><description>Chronocoll_Bernard a écrit : &#13;
&gt; C'est mon instruction&#13;
&gt; MaCommandeAExécuter.LitSortieStandard(Vrai)&#13;
&gt; Qui était mal écrite...…</description><guid isPermaLink="true">https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278220/read.awp</guid><link>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278220/read.awp</link><source url="https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd/read.awp">Envoie d'une commande au DOS (CMD)</source><title>Re: Envoie d'une commande au DOS (CMD)</title></item><item><author>Chronocoll_Bernard</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278210/read.awp</comments><pubDate>28 Oct 2025 14:49:51 Z</pubDate><description>Fabrice N a écrit : &#13;
&gt; Bonjour Bernard,&#13;
&gt; &#13;
&gt; ................................&#13;
&gt; Cdlt&#13;
&gt; Fabrice&#13;
&#13;
Merci beaucoup, Fabrice, …</description><guid isPermaLink="true">https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278210/read.awp</guid><link>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278210/read.awp</link><source url="https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd/read.awp">Envoie d'une commande au DOS (CMD)</source><title>Re: Envoie d'une commande au DOS (CMD)</title></item><item><author>Fabrice N</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278208/read.awp</comments><pubDate>28 Oct 2025 14:08:17 Z</pubDate><description>Bonjour Bernard,&#13;
&#13;
Essayes ceci... ça devrait fonctionner :&#13;
[code:wl]&#13;
		MaCommandeAExécuter est une Commande&#13;
		I_NbreLigne e…</description><guid isPermaLink="true">https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278208/read.awp</guid><link>https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd-278208/read.awp</link><source url="https://forum.pcsoft.fr/en-US/pcsoft.fr.windev/278205-envoie-commande-dos-cmd/read.awp">Envoie d'une commande au DOS (CMD)</source><title>Re: Envoie d'une commande au DOS (CMD)</title></item></channel></rss>
