1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| clear host
$Monfichier="C:\testid.txt"
$Monfichieravt="C:\testidavt.txt"
$nbr_lignes=0
$nbr_lignesavt=0
##################################récupération process notepad avt################################
Clear-Content $Monfichieravt
$processavt= get-process notepad
$processavt >> "C:\testidavt.txt"
$contenu_MonFichieravt = get-content $Monfichieravt
foreach ($UneLigneavt in $contenu_MonFichieravt)
{
$nbr_lignesavt++
}
$nbr_lignes2avt = $nbr_lignesavt - 3
write "nombre de process notepad ouvert avt:"$nbr_lignes2avt
##################################################################################################
\\srv-ctrx-063\c$\OutilsIntégrationV6\MES_XML.txt
##################################récupération process notepad aprés##############################
Clear-Content $Monfichier
$process= get-process notepad
$process >> "C:\testid.txt"
$contenu_MonFichier = get-content $Monfichier
foreach ($UneLigne in $contenu_MonFichier)
{
$nbr_lignes++
}
$nbr_lignes2 = $nbr_lignes - 3
write "nombre de process notepad ouvert aprés:"$nbr_lignes2
#if ($nbr_lignes2 -eq -2)
# {
# write "probléme lors de l'ouverture tu fichier XML à copier"
# }
#else
#{
#write "nombre de process notepad ouvert:"$nbr_lignes2
#write $process
#}
#
##################################################################################################
#if($nbr_lignes2avt -lt $nbr_lignes2)
# {
# write " |
Partager