Created
February 25, 2015 08:48
-
-
Save rikwatson/d6291e7a360dbb74e1b1 to your computer and use it in GitHub Desktop.
Create (if necessary) & returns a folder on the users desktop of the format yyyy-mm-dd which can be used to export stuff into.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Create (if necessary) & returns a folder on the users desktop of the format yyyy-mm-dd which | |
can be used to export stuff into. | |
#> | |
function _get_exportFolder | |
{ | |
param() | |
$exportFolder = Join-Path (Join-Path $env:USERPROFILE "Desktop") (Get-Date -Format yyyy-MM-dd) | |
if (!(Test-Path $exportFolder)) | |
{ | |
New-Item -Path $exportFolder -ItemType directory | Out-Null | |
} | |
return $exportFolder | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment