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

Reply To: Export-Csv to a hidden file

$
0
0

Dynamically create a temp file, and as Don said, move it when you’re done.

PS foo:\> $path = [IO.Path]::GetTempFileName()
PS foo:\> $path
C:\Users\bob\AppData\Local\Temp\tmp1CA9.tmp
PS foo:\> Add-Content -Path $path "foo"
PS foo:\> mv -Path $path -Destination c:\scripts\gilroy.txt
PS foo:\> cat C:\Scripts\gilroy.txt
foo
PS foo:\>


Viewing all articles
Browse latest Browse all 13067

Trending Articles