Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Check if text file is empty

$
0
0

Slight modification and it now works! Huzzah!

if((Get-Content "c:\Scripts\CurrentPass.txt") -eq ""){
Remove-Item c:\Scripts\CurrentPass.txt
Rename-Item c:\Scripts\FuturePass.txt CurrentPass.txt

Viewing all articles
Browse latest Browse all 13067

Trending Articles