05-11-2018 01:09 PM
I have an application that has 2 for loops, in one, I read a tab delimitted txt file, and in the other, I read all files in a folder.
I am trying to compare the names of the files in the csv with the names of the files in the folders, and generate an array, with the last 6 characters of the last folder path.
From what I can understand, my code should work, but it doesn't even enter the first for loop.
Please help me.
Thanks.
05-11-2018 01:15 PM - edited 05-11-2018 01:16 PM
Have you probed the output from the read delimited spreadsheet vi? Do you get anything out? If you do not then that is your problem.
Can you post the CSV file so we can see what you are trying to process?
05-11-2018 01:20 PM
I used a probe of the file, and it reads perfectly, but it doesn't enter the for loop.
05-11-2018 01:26 PM
can you post the csv file?
05-11-2018 01:29 PM
How many files are in the recursive file list from the lower path control? Why is the "folder" path control not to set for "folders only". Since it is so narrow, it is hard to tell what it actually contains, so make sure to resize it sufficiently and that it points to a folder and not to a file. If that resulting recursive list is empty, the inner loop will iterate zero times and since there is no code in the outer loop, you won't be able to tell the difference unless you do execution highlighting or probing. Did you?
05-11-2018 02:27 PM - edited 05-11-2018 02:28 PM
Well I have found that whenever an auto-indexing for loop does not run there is something wrong with the array I am feeding it.
Usually it's an empty(1d) array or the dimension that is used for indexing is empty (2d).
Try placing an indicator or two on your diagram for troubleshooting as see if your arrays contain the data your think they do, especially inside the for loop after is is indexed.
If the first indexed element is empty your loop will run ZERO iterations.