remove unnecessary prints to console
This commit is contained in:
@@ -11,7 +11,7 @@ $C_FILE = "${WORK_DIR}\InstalledSoftware_Current.csv"
|
||||
Function Write-LineToFile {
|
||||
param([Parameter(Mandatory=$true)][string]$Path,[Parameter(Mandatory=$true)][string]$Line)
|
||||
If ( -not (Test-Path $Path) ) {
|
||||
Write-Output "Creating file ""${Path}"""
|
||||
#Write-Output "Creating file ""${Path}"""
|
||||
Try { New-Item -Path $Path -ItemType File -Force | Out-Null }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
}
|
||||
@@ -81,7 +81,7 @@ Function Get-ItemPropertyInfo {
|
||||
}
|
||||
|
||||
# Create $WORK_DIR if it doesn't exist
|
||||
If ( -not (Test-Path $WORK_DIR) ) { New-Item -Path $WORK_DIR -ItemType Directory -Force }
|
||||
If ( -not (Test-Path $WORK_DIR) ) { New-Item -Path $WORK_DIR -ItemType Directory -Force | Out-Null }
|
||||
|
||||
# Create $C_FILE if it doesn't exist
|
||||
If ( -not (Test-Path $C_FILE) ) {
|
||||
@@ -135,13 +135,13 @@ If ( (Test-Path $C_FILE) -and (Test-Path $P_FILE) ) {
|
||||
|
||||
# Delete $P_FILE
|
||||
If ( Test-Path $P_FILE ) {
|
||||
Write-Output "Deleting ""${P_FILE}"""
|
||||
#Write-Output "Deleting ""${P_FILE}"""
|
||||
Remove-Item -Path $P_FILE -Force
|
||||
}
|
||||
|
||||
# Rename $C_FILE to $P_FILE
|
||||
If ( Test-Path $C_FILE ) {
|
||||
Write-Output "Renaming ""${C_FILE}"" to ""${P_FILE}"""
|
||||
#Write-Output "Renaming ""${C_FILE}"" to ""${P_FILE}"""
|
||||
Move-Item -Path $C_FILE -Destination $P_FILE -Force
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user