10.03.2010, 01:39
Awesomeness double post, I was sorting through my NAS when I came across this. Points given to those who know what this is:
Code:
$directory = "C:\path\to\sa-mp\server\" $serverlog = "server_log.txt" if((Test-Path -path "$directory\logs\") -ne $True) { New-Item "$directory\logs\" -type directory echo "A new log directory has been created." } $timestamp = (date -uFormat %s) $thedate = (date) cat "$directory\$serverlog" | out-File -encoding ascii "$directory\logs\server.$timestamp.txt" echo "Refreshed at $thedate" | out-File -encoding ascii "$directory\$serverlog"