NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Move file to u drive (usb flash drive) cRIO-9068

Solved!
Go to solution

Is it possible to move a file to a flash drive? I want to create a file on the cRIO hard drive and then move it to a flash drive. It seems like you can write directly to a flash drive, but I get Error 8 (File permission error) if I try to use the Move file function to move a file between the hard drive of the cRIO and a USB flash drive. Do I need to use something like the WebDAV protocol to do this transfer?

Attached code shows the "move" I am trying to do.

Thanks!

0 Kudos
Message 1 of 3
(4,485 Views)
Solution
Accepted by topic author Lauren_MSI

I believe this is due to a permissions warning, and has already been found and fixed in the next release. Until then, use the System Exec.vi to move files with the 'move' function when moving files between devices:

mv <filepath1> <filepath2>

in a string command.

--
Michael P
National Instruments
0 Kudos
Message 2 of 3
(3,338 Views)

Attached there's a simple version of the copy.vi that uses system exec. Remember that it's just a draft and there are several improvements you can do (e.g. improve error handling).

hope this helps,

Fabio

Fabio M.
NI
Principal Engineer
Message 3 of 3
(3,338 Views)