Create temporary files


posted by Tobias Weltner
11-10-2008

Downloads: 386
File size: 111 B
Views: 4,080

Embed
Create temporary files
  1. $filename = "$env:temp\TEMP-$(Get-Date -format 'yyyy-MM-dd hh-mm-ss').log" 
  2. New-Item $filename -itemType File 
Filed under: , , ,
demonstrates how to create a temporary file name based on date and time and create a file with that name in your temp folder.
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.