mirror of https://gitee.com/bigwinds/arangodb
16 lines
393 B
PowerShell
Executable File
16 lines
393 B
PowerShell
Executable File
New-Item -ItemType Directory -Force -Path C:\ports
|
|
|
|
$timeLimit = (Get-Date).AddMinutes(-480)
|
|
Get-ChildItem C:\ports | ? { $_.LastWriteTime -lt $timeLimit } | Remove-Item
|
|
|
|
$port = 15000
|
|
$portIncrement = 2000
|
|
|
|
$port = $port - $portIncrement
|
|
|
|
do {
|
|
$port = $port + $portIncrement
|
|
$portFile = "C:\ports\$port"
|
|
}
|
|
until (New-Item -ItemType File -Path $portFile -ErrorAction SilentlyContinue)
|