textbox - browse for file problem

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 101
Joined: Tue Oct 06, 2009 12:08 am

Re: textbox - browse for file problem

Post by bn2hunt »

Changed all of my folder locations to use New-PSDRIVE and changed the variable holding the location to script wide variables and it started to work.

Code: Select all

New-PSDrive -name copy2 -psprovider FileSystem -root $script:copy2
New-PSDrive -name mdf_loc -psprovider FileSystem -root $script:mdf_loc
New-PSDrive -name log_loc -psprovider FileSystem -root $script:ldf_loc
New-PSDrive -name copyfrom -psprovider FileSystem -root $copyfrom