LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

select multiple files and folders

Hi,

 

Is there any file dialog vi that allows you to select multiple files and folders? I am looking at file dialog in advanced file functions but it only allows file selection if I want to select multile items - it doesn't allow me to select folders.

0 Kudos
Message 1 of 16
(9,309 Views)

When you drop the file dialog.vi in the BD a configuration menu opensand you can uncheck Limit selection to single item and you can select File or folder.

 

Ben64

 

EDIT: You're right, when we uncheck Limit selection it greys out the selection menu. Maybe you can use the Recursive File List.vi.

 

File Dialog.png

0 Kudos
Message 2 of 16
(9,300 Views)

But I wan to select *multiple* files and folders.

0 Kudos
Message 3 of 16
(9,297 Views)

Uncheck the "Limit Selection" box in the Express VI and the function will allow you to select multiple files and folders.  Hold CTRL while selecting the files.  It will return an array of paths.

aputman
0 Kudos
Message 4 of 16
(9,285 Views)

Correction:  It only returns files.  My bad.

aputman
0 Kudos
Message 5 of 16
(9,280 Views)

@LVCoder wrote:

But I wan to select *multiple* files and folders.


Uncheck the "Limit Selection to One Item" and select the "Files and Folders".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 16
(9,256 Views)

File Dialog doesn't let me select "files of folders" if I uncheck "Limit Selection to One Item". The function automatically select "files" if I uncheck "Limit Selection to One Item"

0 Kudos
Message 7 of 16
(9,245 Views)

@crossrulz wrote:
Uncheck the "Limit Selection to One Item" and select the "Files and Folders".

That doesn't work to select multiple folders.  You can only select files with this option unchecked.

aputman
0 Kudos
Message 8 of 16
(9,244 Views)

Roll your own using a listbox.  I made this reentrant VI that calls itself if only one folder is selected, otherwise it returns the selected folders.  The attached VI needs a bunch of refinement (error handling, at least), but it does what I think you want.

 

Example_VI_BD.png

 

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 9 of 16
(9,231 Views)

I tried hacking into the core built-in function (File Dialog);  I was able to set the selection mode flags to disallowed values:

selection mode.png

When I ran it, it would actually let me select multiple files or folders, but unfortuneatly the output only returned the files I selected, not any of the folders.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 16
(9,193 Views)