12-13-2013 11:52 AM
I do not know if this has been reported before, but I could not find it on the discussion boards.
When using the File/Directory Info Function an Error code of 1 is supposed to be returned if the file contains an invalid character, such as @ or ?. However, at least in LabVIEW 2013 this is not always true. In order to receive the correct error code the directory output of the function must be wired. I believe this is a bug. See attached snippet.
When the Directory indicator is not wired it returns Error code 7, which indicates the file does not exist. While this is True, if one was using this function to determine if a file/directory name is valid, the wrong answer appears. Either way the function is inconsistent.
Also attached is the vi.
Cheers,
mcduff
12-16-2013 08:31 AM
Hi mcduff,
This is Mike Watts in Applications Engineering at National Instruments. Thanks for bringing this to our attention. I have not seen this one before. I am going to do some research to see if this behavior is expected, and if it is not expected, I will file a Corrective Action Request regarding this potential bug. I will update you if I learn something useful. Thanks!
12-16-2013 09:23 AM
Thanks for looking into it. I am not sure why wiring an indicator would give a different error code, as I saw nothing that mentioned it in the help.
Thanks again.
Cheers,
mcduff