Is there any way to have multiple file selection and have long filenames returned with the open dialog box?
Printable View
Is there any way to have multiple file selection and have long filenames returned with the open dialog box?
Code:CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNLongNames
this doesnt seem to be working for me, is it just me what could i be doing wrong
Private Sub Form_Load()
'display the commondialog show open
On Error GoTo QuitNow:
CommonDialog1.InitDir = "C:\" 'set dir path
CommonDialog1.CancelError = True 'used in cancel code
CommonDialog1.Filter = "All files(*.*)|*.*" 'filter for all files
CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNLongNames
CommonDialog1.ShowOpen
'show files
QuitNow:
Exit Sub
End Sub
The problem with this is that the filenames are delimited by spaces. This makes it difficult to separate the filenames (it is likely that you will run into a filename with a space in it).
If someone has a solution to this problem please help me out. It has me stumped right now.
multi select file names separated by ;
OK, I figured it out.
I am using API on Windows NT. API (WinNT) delimits with vbNull. Like this: "path(vbNull)filename1(vbNull)filename2(vbNull)..."
I think the delimiter varies with OS.
I will have to test my program on Win9x to see if the delimiter is the same.
All the documentation I read said that the MultiSelect was delimited by spaces.
Thank you.
i think it is delimited by a ; semicolon..