powershell lottery wheel that use your lucky numbers and outputs it to csv

powershell lottery wheel that use your lucky numbers and outputs it to csv

this script alternatives nine random  lucky numbers  2000 instances and outputs it to a .csv document ,, it will also be custom designed to suite different lotteries

 

$num = “2000” # what number of video games you prefer to play 

$select = “9” # what number of numbers you prefer to use
$mynum = 19,33,25,40,20,five,three,27,2,7,35,21,28,17,34,6,16,1,29,eight,44,22,13,37,26,41,43,23,15,39 # your lucky numbers

$file1 = “C:Temprandom7.txt”
$file2 = “C:Temprandom8.csv”
$file3 = “C:Temprandom9.csv”
$file4 = “C:Temprandom10.csv”

If (Test-Path($file1 ))
If (Test-Path($file2 ))
If (Test-Path($file3 ))
If (Test-Path($file4 ))

$numbers = for ($x = 1; $x -lt $num; $x++)
sort-object ) -join (“,”)

Get-Content $file1 | Foreach-Object |Out-File -FilePath $file2 -Encoding OEM

Import-Csv -Delimiter “,” -Header @(“a”,”b”,”c”,”d”,”e”,”f”,”g”,”h”,”i”) -Path $file2 | make a choice a,b,c,d,e,f,g,h,i | feet -auto |Out-File -FilePath $file3 -Encoding OEM

$FileContent = gc $file3
$FileContent = $FileContent[3..($FileContent.Count – 2)]
$FileContent | Out-File $file3
Get-Content $file3| Foreach-Object |Out-File -FilePath $file4 -Encoding OEM -Append
$content material = Get-Content -Path $file4
$content material -notmatch ‘(^[s,-]*$)|(rowss*affected)’ | Set-Content -Path $file4
Start-Process $file4

Updated: December 27, 2017 — 5:59 pm

Leave a Reply

Your email address will not be published. Required fields are marked *