Multi File selection

Just starting out? Need help? Post your questions and find answers here.
Waussie
User
User
Posts: 24
Joined: Fri Nov 11, 2005 12:14 pm

Multi File selection

Post 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)
Currently coding the unbelievable WFS program...
You'll know it, when it gets released...
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Code: Select all

While File$
  Debug File$
  File$ = NextSelectedFileName() 
Wend 
I may look like a mule, but I'm not a complete ass.
Waussie
User
User
Posts: 24
Joined: Fri Nov 11, 2005 12:14 pm

Post by Waussie »

Thank you, works like a charm.
Currently coding the unbelievable WFS program...
You'll know it, when it gets released...
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Waussie wrote:Thank you, works like a charm.
Taken straight out of the help manual! :wink:
I may look like a mule, but I'm not a complete ass.
Post Reply