ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Move.vi error10.

Solved!
Go to solution

I checked the posts but couldn't find anything that explained my particular situation.

 

I am trying to rename a file by changing the extension from .tmp to .txt

 

That's it!

 

It is creating the new file (.txt), but not deleting the old (.tmp).  I also attached an image of the error message.

 

What am I missing other than my sanity?

Download All
0 Kudos
Message 1 of 6
(3,948 Views)

Hi epster88,

 

did you check both path using probes or indicators?

For safety you should always use file functions to manipulate filenames (strip path/build path/GetFileExtension)...

Message Edited by GerdW on 09-03-2009 09:43 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(3,938 Views)
Solution
Accepted by epster88

The second path should be a directory if you're trying to move.

 

Apologies... The only issues I see with this is, that either the file already exists, or there is write permission error..

Message Edited by NitinD on 04-09-2009 01:17 AM
Message 3 of 6
(3,936 Views)

Hi NitinD,

 

no, the target path can include a filename, this example works fine for me:

Move.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,925 Views)

My bad... guess i'm sleepy... I tried running it... it works fine in my computer... 

 

By it I meant the code in OP

 

Capture.JPG

Its working on my system for a hard disk path...

Message Edited by NitinD on 04-09-2009 01:27 AM
0 Kudos
Message 5 of 6
(3,921 Views)

That's it.  I forgot that this account could only write to the directory, not delete or edit.


Thanks NitinD

0 Kudos
Message 6 of 6
(3,904 Views)