How To

From MPSWiki
Revision as of 13:19, 12 March 2020 by Svan (talk | contribs) (Created page with "==Lock The file using powershell== run powershell (not ISE!) <pre> $fileName = "C:\Users\Public\Documents\FIELDPRO\PROJECTS\folder\Ovintiv Dan FIU 6H FED 8H.PRJ\1.fpx" $file...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Lock The file using powershell

run powershell (not ISE!)

$fileName = "C:\Users\Public\Documents\FIELDPRO\PROJECTS\folder\Ovintiv Dan FIU 6H FED 8H.PRJ\1.fpx"
$file = [System.io.File]::Open($fileName, 'Open', 'Read', 'None')
Write-Host "Press any key to continue ..."
$null = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
$file.Close()