diff --git a/AutoTx/Resources/Update-AutoTxService.ps1 b/AutoTx/Resources/Update-AutoTxService.ps1 index b83535a4a47f71a3e07fa8ad0429e5388e3ba1b2..382e6bbc60149d9677f8ef7c2cbf354885bb390d 100644 --- a/AutoTx/Resources/Update-AutoTxService.ps1 +++ b/AutoTx/Resources/Update-AutoTxService.ps1 @@ -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"