Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 15851

Powershell filebrowser dialog includes shortcut files despite filter

$
0
0

I run the following powershell script to select .ps1 files :

Add-Type -AssemblyName System.Windows.Forms$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog$FileBrowser.InitialDirectory = "c:\temp"$FileBrowser.Filter = "Files ps1(*.ps1)|*.ps1"[void]$FileBrowser.ShowDialog() 

Despite the filter, shortcut files are included in the selection.My folder contains the following files :

a.ps1cdr.accdbCDR_RETOURS_70.accdbMAIL.docx --> word fileMAIL.docx --> .lnk shortcut to the MAIL.docx word file 

The filebrowser dialog offfers :

a.ps1MAIL.docx (the .lnk shortcut to the MAIL.docx word file)

What did I wrong?Thank you

I expected to get onlya.ps1


Viewing all articles
Browse latest Browse all 15851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>