Thursday, June 16, 2011

Select a folder to save to...

Function Get-SaveDir()
{
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") |
Out-Null

$SaveFileDialog = New-Object System.Windows.Forms.FolderBrowserDialog
$SaveFileDialog.Description = "Type in a description"
$SaveFileDialog.ShowDialog() | Out-Null
$SaveFileDialog.SelectedPath
}



$SaveDir = get-savedir

No comments:

Post a Comment