LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW "List Folders" function alphabetical sort not same as Windows Explorer

Hi all

 

The "List Folder" function does not list filenames in the same order as Windows Explorer (Windows XP, LabVIEW 2009SP1)

 (see attached).    Anyone else experience this?   Just wanted to check before writing code that works around this

 

Regards

 

Vijay

0 Kudos
Message 1 of 10
(8,342 Views)

NIExpert wrote:

Hi all

 

The "List Folder" function does not list filenames in the same order as Windows Explorer (Windows XP, LabVIEW 2009SP1)

 (see attached).    Anyone else experience this?   Just wanted to check before writing code that works around this

 

Regards

 

Vijay


In my experience, True!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 10
(8,330 Views)

What you are seeing is that the OS looks a little deeper into the filenames. This started with XP. Numeric sequences are considered and sorted with lowest values first. LabVIEW uses strict ASCII sorting. Thus, in your case, the two files "Att_0o5dB.xls", and "Att_0o25dB.xls" would have "Att_0o5dB.xls" listed first by the OS because 5 is smaller than 25. However, LabVIEW would list "Att_0o25dB.xls" first since the ASCII value of 2 is less than the ASCII value of 5.

 

I'm not sure, but I think, for instance, Linux uses ASCII sorting. Not sure about OS X.

Message Edited by smercurio_fc on 05-17-2010 01:38 PM
0 Kudos
Message 3 of 10
(8,306 Views)

Hello all .

 

I am using labview for reading waveform files and I have the same problem and need to read in waveforms stored in a txt file in sequence , problem is that they are ordered as follows

G:\Tests\Test 2\Waveforms\t2_1_1_14536301.txt
G:\Tests\Test 2\Waveforms\t2_1_2_18270829.txt
G:\Tests\Test 2\Waveforms\t2_1_3_22851419.txt
G:\Tests\Test 2\Waveforms\t2_1_4_22934557.txt

 

If Labview was to reading the filename found in the folder it would order them in the order of the biggest down to the smallest , I built this VI to fix the problem its only basic as I am still new to LV but it dose the job for me , If its any use to anyone else please find attached

 

Thanks

 

Rob

Using labview since LV 8.6 , Great Stuff 🙂
Download All
0 Kudos
Message 4 of 10
(8,194 Views)

FYI, just because it is related, I have attached a VI which alphabetizes a 2D array. Saved to 8.2.

 

 

Richard






Message 5 of 10
(8,171 Views)

Thanks ,

 

That will sort the problem with the second set of files I have from two cameras !

 

Cheers

 

RobSmiley Happy

Using labview since LV 8.6 , Great Stuff 🙂
0 Kudos
Message 6 of 10
(8,159 Views)

hi all

Actually I am trying to import several image files to my Labview program but I want to specify the folder instead of importing image at each time.

I highly appreciate if any could help me

thanks

Mori

0 Kudos
Message 7 of 10
(7,241 Views)

This sounds like a different question than what was originally asked in the thread.

 

To get help, you'd be better off posting your question as a new message thread.  And please provide more detail in your question.

0 Kudos
Message 8 of 10
(7,234 Views)

Mori,

 

I would agree with Raven a new thread and more info please, but just to put what I think you are looking for into the reply I think what you are look for is the Recursive File List.vi. Its found in Programming>>FileI/O>>Adv File Funcs>>Recursive File List. This vi will give you the array of paths in the folder so just use the array of paths and programmatically open the image do your analysis and open the next one and so on .....

 

Hope this helps

 

Rob

0 Kudos
Message 9 of 10
(7,140 Views)

Thank you

you are right, I create a new threat,

http://forums.ni.com/t5/LabVIEW/Automatically-import-image-files-from-a-folder-to-Labview/m-p/169599...

you hint is very helpful for me,

 

0 Kudos
Message 10 of 10
(7,113 Views)