Jump to content

Error 5 "file already open"


Recommended Posts

HI,

I'm trying to read a text file and based on some condition I need to delete the file. The problem is that sometimes I received the error 5 "File already open" and I don't know why, I close the file after so I have no idea why it could be still open.

Thanks for your help.

Link to comment

Wire the error in & out of the "Close" vi. Then have the "error out" wired to your Case structure. This way you'll be sure the file is closed properly before you try to delete it.

EDIT: You could also use the "path" output from the Close vi. This will ensure dataflow happens the way you want it to happen.

post-10515-1219083511.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.