Jump to content

Move File Error 10

Recommended Posts


I have a vi, where after closing the file there is a check if some parameter has changed, so that the filename should be changed accordingly.

What is done is simply create a new path with the current parameters, and check this path with the original path of the saved file. If both paths are identical, nothing is done. If the paths are different then the file is renamed with the "Move" VI.

The vi works as expected most of the time, but where the executable is installed by a customer, error 10 is returned occasionally.

I do not understand how this can happen: if the path is duplicated then the result of the comparison should avoid the file name change.

In case that another file with the same name already existed, the returned error would then be different.

Any hints of what could be happening are welcome.

Thank you.





Link to comment

I've seen this before, and I've seen it fixed by adding a small delay before attempting to move the file, as some process wasn't quite done messing with it.  I don't think the error is descriptive enough and Duplicate Path doesn't mean what it seems.  Another suggestion is to try to use the Windows Move DLL call if this is in Windows.



This invokes the move operation using the system level calls which I've seen work, when the LabVIEW one hit these types of possible edge cases.

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.

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.