browse for folder powershell
function BrowseForFolder($initialDirectory="")
{
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null
$folderBrowserDialog = New-Object System.Windows.Forms.FolderBrowserDialog
$folderBrowserDialog.Description = "Select a folder"
$folderBrowserDialog.rootfolder = "MyComputer"
$folderBrowserDialog.SelectedPath = $initialDirectory
if ($folderBrowserDialog.ShowDialog() -eq "OK")
{
return $folderBrowserDialog.SelectedPath
} else {
return $initialDirectory
}
}
$window.FindName("TargetDir").Text = $outDir
# Browse for target dir
$BrowseForTargetDirButton = $window.FindName("BrowseForTargetDir")
$BrowseForTargetDirButton.Add_Click({
$currentDir = $window.FindName("TargetDir").Text
$window.FindName("TargetDir").Text = BrowseForFolder($currentDir)
})
Also in C++:
- git remove current pull
- how to set up python virtual environment
- E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
- brew install wine
- scikit-learn install error
- how to install ros package
- install serverless framework
- Illuminate\Http\Exceptions\PostTooLargeException Ubuntu
- $ git update-index --chmod +x ./scripts/moveFile.sh
- git revert all commits to pervious commit
- remote desktop connection wsl2
- bash array initialization multiple lines
- azure ad powershell module install
- how to install flow on gatsbyjs
- Flutter plugin not installed; this adds Flutter specific functionality
- bash size file
- ohmyzsh
- init npm
- sed remove last 3 lines
- install teamviewer ubuntu 18
- add date to git reflog
- postgresql not connected docker
- bash variable in string
- install zlib ubuntu