Skip to content
Snippets Groups Projects
Commit fa5645ce authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard: Committed by Niko Ehrenfeuchter (adm)
Browse files

Explain backup timestamp.

Refers to #13
parent c2445423
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,7 @@ function Update-FileIfNewer([string]$SourcePath, [string]$Destination) {
Log-Info -Message "Found newer file at $($SourcePath), updating..."
Stop-MyService
# assemble a timestamp string like "2017-12-04T16.41.35"
$BakTimeStamp = Get-Date -Format s | foreach {$_ -replace ":", "."}
$BakName = "$($SrcFileNoSuffix)_pre-$BakTimeStamp$SrcFileSuffix"
Rename-Item "$DstPath" "$Destination\$BakName"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment