Page 1 of 1

Multi File selection

Posted: Mon Nov 10, 2008 12:07 pm
by Waussie
I am trying to get a string with all files selected with openfilerequester command.
But the last line of my code (in BOld) only gives 1 file instead of all the files.

I tried using an array for file$, but didn't get it working either.
After the files are selected i want to read data from them, one by one.

So what am I doing wrong?


Pattern$ = "All files (*.*)|*.*"
Pattern = 0
While result = 6 Or result = 0
File$ = OpenFileRequester("Select FB1-Files", StandardFile$, Pattern$, Pattern,#PB_Requester_MultiSelection)
result = MessageRequester("Files added to featureBlock 1", "Selected Files were added To featureblock 1, Select more?",#PB_MessageRequester_YesNo)
Wend
MessageRequester("Result", Str(result))


MessageRequester("Information", "You have selected following files:"+Chr(10)+File$, 0)

Posted: Mon Nov 10, 2008 12:12 pm
by srod

Code: Select all

While File$
  Debug File$
  File$ = NextSelectedFileName() 
Wend 

Posted: Mon Nov 10, 2008 12:18 pm
by Waussie
Thank you, works like a charm.

Posted: Mon Nov 10, 2008 12:18 pm
by srod
Waussie wrote:Thank you, works like a charm.
Taken straight out of the help manual! :wink: