LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Directory Doesn't Work!!! (stupid computers, mumble grumble)

Ok, so maybe I'm an ass.... but this rather simple section of code to dynamically create a timestamped directory if it's not there, and not create it if it is, doesn't work.  I can't understand why it doesn't, but it doesn't.  Can someone please help me out, I've written a huge super complex imaging program and finished it this past sunday only to have the very last problem in the software be with this stupid save file routine!
 
 
Thanks so much for the help!
 
Jonathan
0 Kudos
Message 1 of 4
(2,433 Views)
Your File/Directory function is returning an error because the directory does not exist. The directory output will be true if the path exists and if it's a directory and not a file. What you should do is is the function returns error code 7, clear the error and then call the New Directory function.
Message 2 of 4
(2,428 Views)
Jonathon,

When I run your VI on my Mac, I get a File not Found error from the File/Directory Info function. That error is fed into the New Directory function, which probably prevents it from running. I think the same thing will apply to other OSes, but I am not sure.

Try putting a probe on the error in line inside the case structure and see what you get.

Lynn
0 Kudos
Message 3 of 4
(2,423 Views)

HAHA!  Thanks Lynn! I found that since I was using the file/dir info .vi improperly (but I knew I was) and hooked it up to the error handling wire it ended up passing the error to the make new dir .vi .   All I had to do was disconnect the error handing routine from the make new dir .vi and it worked! nice.

 

thanks,

jonathan

 

0 Kudos
Message 4 of 4
(2,407 Views)