Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for($i = 0;$i -le 30;$i++) {
  2.     if (Test-Path "$i") {
  3.         Remove-Item "$i" -Recurse
  4.     }
  5.     New-Item -Path "./" -Name "$i" -ItemType directory
  6.     Set-Location "$i"
  7.     if (Test-Path "$i.txt") {
  8.         Remove-Item "$i.txt"
  9.     }
  10.     for($line = 0;$line -le 50;$line++) {
  11.         Add-Content -Path "$i.txt" -Value ("{0}---{1}---{2}{3}---{4}" -F (Get-Random -Minimum 1000 -Maximum 32768),
  12.                                (Get-Random -Minimum 1000 -Maximum 32768),
  13.                                (Get-Random -Minimum 1000 -Maximum 32768),
  14.                                (Get-Random -Minimum 1000 -Maximum 32768),
  15.                                (Get-Random -Minimum 1000 -Maximum 32768))
  16.     }
  17.     Set-Location ".."
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement