LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete empty path in array

HI,

 

I have uploaded a program. In this program, a path to a folder in my system is taken as input. Then all the files in the folder is checked to have a date older than a particular date and then if it is older it ouputs that path into a ouput array. So the output is an array of paths. So while checking each file if there is a file which is not older than that particular date, then that part in the array will be empty. Please check the program and see if that empty array can be removed. That is array should not contain any empty rows, only rows with paths of the files which are older than the particular date must be present. Please help me. Thanking You in advance. 

0 Kudos
Message 1 of 9
(5,118 Views)
0 Kudos
Message 2 of 9
(5,099 Views)

Wouldn't it be easier to just not add the empty paths to the array in the first place?  If you were using a newer version of LabVIEW, I would tell you to use the Conditional Indexing Tunnels.  But since you aren't, you will have to use Build Array and a case structure.


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
Message 3 of 9
(5,086 Views)

Thank you very much cross rulz. Yes it is obvious that your method is far simpler than mine. Thank You very much.

0 Kudos
Message 4 of 9
(5,028 Views)

what about this code  I think it is simple answer for this problem code.jpg

0 Kudos
Message 5 of 9
(5,010 Views)

Hatef,

 

Instead of begging for Kudos and Solutions, read the responses carefully before answering.  Crossrulz said "If you were using a newer version of LabVIEW, I would tell you to use the Conditional Indexing Tunnels.  But since you aren't, you will have to use Build Array and a case structure."

 

BS

Message 6 of 9
(5,002 Views)

Bob_Schor
you was More polite in your PM that what your are?!
about attention to Kudos and Solutions
the person who change my mind was Ben And Now I am agree with that
but about the i just do not understand Crossrulz means about this sentence
""If you were using a newer version of LabVIEW"" is about this method
bu also I do not think I post wrong thing here
I just add new picture and try to complete what Crossrulz but i just do not understand that Crossrulz mention to this method in his post
anyway I do not want to offend any body here I am just happy to find many people here that are expert in labview

best regard,
Hatef

 

Edited 02/26/2016 per user's request

0 Kudos
Message 7 of 9
(4,985 Views)

Hatef,

 

Bob is just asking that you don't throw solutions out without understanding what has already been said in the thread. crossrulz already gave a solution to this thread and he explicitly gave his reason for why he didn't suggest conditional terminals (older LV versions don't support conditional terminals).

 

I don't believe Bob was being rude. Responding with a solution that has already been disqualified adds confusion to the thread.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 8 of 9
(4,968 Views)

I haven't seen it mentioned yet so another solution to the original question is to use the OpenG filter 1D array function.  You basically tell it what things to remove and you can tell it to remove empty paths.  The previous solution of not including empty paths in the first place is probably a better one in this case.

Message 9 of 9
(4,882 Views)