프로젝트

일반

사용자정보

통계
| 개정판:

hytos / ID2.Manager / FileUpdate.ps1 @ c47ad347

이력 | 보기 | 이력해설 | 다운로드 (692 Bytes)

1 bcc7d79e yoush97

2
$sourceFilePath = $args[0]
3
$targetFilePath = $args[1]
4 a55ba94c taeseongkim
5
$sourceFileVersionInfo = Get-ItemProperty -Path $sourceFilePath -Name VersionInfo
6
$targetFileVersionInfo = Get-ItemProperty -Path $targetFilePath -Name VersionInfo
7
8
$sourceFileVersion = $sourceFileVersionInfo.VersionInfo.ProductVersion
9
$targetFileVersion = $targetFileVersionInfo.VersionInfo.ProductVersion
10
11
Write-Output "Source File Version: $sourceFileVersion"
12
Write-Output "target File Version: $targetFileVersion"
13
14
if ([version]$sourceFileVersion -gt [version]$targetFileVersion) {
15
    Copy-Item -Path $sourceFilePath -Destination $targetFilePath -Force
16
    Write-Host "File copied."
17
} else {
18
    Write-Host "No need to copy."
19
}
클립보드 이미지 추가 (최대 크기: 500 MB)