1
0
Files
Repository/Tools/PS2EXE-GUI/Examples/Confirm.ps1
2025-10-31 08:58:36 +01:00

9 lines
516 B
PowerShell
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Write-Host "Creating file '.\Test.txt'"
ls > .\test.txt
Write-Host "Removing file '.\Test.txt' depending on confirmation."
del .\Test.txt -confirm
if (Test-Path '.\Test.txt')
{ "File '.\Test.txt' is still there." }
else
{ "File '.\Test.txt' was deleted." }