Skip to content

Instantly share code, notes, and snippets.

@zhangzhishan
Last active April 28, 2020 01:38
Show Gist options
  • Save zhangzhishan/910065d5e0527e3e7938677c23bbe75d to your computer and use it in GitHub Desktop.
Save zhangzhishan/910065d5e0527e3e7938677c23bbe75d to your computer and use it in GitHub Desktop.
powershell related code #powershell
$path = "k:\Index\rebuild\"
# $path = "D:\zhizha\tmp\"
$bigrampath = $path + "*bigram"
$files = Get-ChildItem $bigrampath -file
foreach ($file in $files) {
$filename = $file.Name
$fullname = $path + $filename
$timeRecordName = "D:\zhizha\" + $filename + "rebuild.txt"
$parsedIndexName = "D:\zhizha\parsedrebuildindex\" + $filename + ".bin"
Start-Transcript $timeRecordName
Write-Output $fullname "satasics results:"
Write-Output ""
Write-Output ""
# .\ParseIndexzhizha.exe $fullname ws
.\ParseIndexzhizha.exe $fullname allword $parsedIndexName
Stop-Transcript
Write-Output ""
}
$path = "k:\Index\1\"
# $path = "D:\zhizha\tmp\"
$files = Get-ChildItem $path -file
foreach ($file in $files) {
$filename = $file.Name
$fullname = $path + $filename
$timeRecordName = "D:\zhizha\" + $filename + "runwstime.txt"
$parsedIndexName = "D:\zhizha\parsedindex\" + $filename + ".bin"
Start-Transcript $timeRecordName
Write-Output $fullname "satasics results:"
Write-Output ""
Write-Output ""
.\ParseIndexzhizha.exe $fullname ws
# .\ParseIndexzhizha.exe $fullname allword $parsedIndexName
Stop-Transcript
Write-Output ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment