mirror of
https://github.com/elmasas/lcs-recomp
synced 2026-10-06 11:16:45 -04:00
17 lines
422 B
PowerShell
17 lines
422 B
PowerShell
param(
|
|
[Parameter(Mandatory = $true)][string]$Executable
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
if (-not (Test-Path -LiteralPath $Executable)) { exit 0 }
|
|
|
|
$stamp = (Get-Item -LiteralPath $Executable).LastWriteTime
|
|
$directory = Split-Path -Parent $Executable
|
|
|
|
Get-ChildItem -LiteralPath $directory -File | ForEach-Object {
|
|
if ($_.FullName -ne $Executable) {
|
|
try { $_.LastWriteTime = $stamp } catch { }
|
|
}
|
|
}
|