A Sample To start powershell
我们需要起个头学习PowerShell
Set-Location 'C:\Users\jwang\Desktop\PDFTEST\PDFsGet'
$lines=Get-Content -Encoding UTF8 FILE_COPY3.LOG
$strArray=@("TemplateName")
$nameArray=@("PDFName")
foreach($line in $lines)
{
$index0=$line.IndexOf("strPdfName=")+"strPdfName=".Length
$index=$line.IndexOf("strtmp=")
$subline0=$line.Substring($index0,$index-1-$index0)
$subline=$line.Substring($index+7)
if($strArray -notcontains $subline)
{
$strArray += $subline
$nameArray+= $subline0
}
}
Love it, and you live without it