I get a file chooser from another discussion and i want to change InitialDirectory value. Now is:
<# :
...
setlocal
for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"')
...
goto :EOF
: #>
Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.InitialDirectory = pwd
$f.Filter = "ucsdb backup (ucsdb.*)|ucsdb.*"
$f.ShowHelp = $false
$f.Multiselect = $false
[void]$f.ShowDialog()
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }
and it open the current directory but i want to open a subfolder. How can i write Batch "%cd%\UCSM_Files\" in InitialDirectory?
Sorry for my bad english