LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

if no file is found, skip to the next step

hi, i have this loop..
it searches through the SN and search for serial numbers that are NOT -1.
going through that loop...
it willl look inside a directory, list the file names and search for any file that look like SN. for instant..i have SN 42245, if i have a file that is SN42245_8908_797.csv, it will find the latest file and read from that file.
but, if no file is found. my program pop up a window and tell me to search for the file manually.
how do i get rid of that?
if no file is found, go to the next step....
can someone give me a pointer?
thanks



Message Edited by krispiekream on 03-05-2008 04:02 PM
Best regards,
Krispiekream
0 Kudos
Message 1 of 11
(3,439 Views)
how do can i do it where if no file of SN is in my directory for search, Labview will automatically find NoConstants.txt in placement of that?
NoConstants.txt is an empty file (a dummy file)

Best regards,
Krispiekream
0 Kudos
Message 2 of 11
(3,414 Views)
Try using the Path Type.vi and capturing the case where the output of Build Path.vi is <Not a Path>.
Message 3 of 11
(3,406 Views)
i think your method might work..
can you show me a diagram?

Best regards,
Krispiekream
0 Kudos
Message 4 of 11
(3,384 Views)
my code is causing an issue here...using the File/Directory Info, when no file is found, i want to ignore it and not have the pop up...
can someone please help me..a diagram would be greatly appreciated..

i dont know how to fix it because i really don't understand how this VI give out the error, and I dont have very well understanding of the simple error handler...

i was going through the forum and found this infomation that is useful
 

"To avoid the pop-ups all you need to do is wire the error cluster and handle the error. In this case, check the error number.
If it is an error you want to ignore, pass an empty error cluster on. If you don't want to ignore it, pass the original error cluster.""

thanks in advance..
Best regards,
Krispiekream
0 Kudos
Message 5 of 11
(3,373 Views)
Try this one... I added a "Strip Path" so that you check the entire folder that your VI is in. Then I check the size of the array of filenames. If it is 0 then no matching file name was found and the default is loaded. There are many ways to accomplish this, but this one was quick and dirty and required only a couple changes to your code.
Message 6 of 11
(3,366 Views)
sorry, i forgot to tell you that i am working with labview 7.0
can you save it as previous version 7.0 or 8.0?
thanks

Best regards,
Krispiekream
0 Kudos
Message 7 of 11
(3,364 Views)

I can't as I'm working on a machine that only has 8.2 right now. Perhaps someone else can jump in. If not, here is a screenshot that should show you what you need.

 

Message 8 of 11
(3,362 Views)
thank you..the picture will do..

Best regards,
Krispiekream
0 Kudos
Message 9 of 11
(3,359 Views)
WOWWWW!!!!
THAT DID THE JOB!!!
THANK YOU SO MUCH..
YOU ARE THE BEST!
Best regards,
Krispiekream
0 Kudos
Message 10 of 11
(3,349 Views)