LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy VI for LV5.1.1

We are using (and stuck with) LV5.1.1. I need to have a Copy VI that
will overwrite a file w/o prompting. The VI in this version errors
without overwriting. I have found a FileCopy VI on the NI website,
but it will not open in 5.1.1. As a workaround, I have created a
batch file and fed it to the System Exec VI. However, that causes
some ugliness as it displays an icon on the taskbar for each file
copied (there may be hundreds at a time). Also, this version of
System Exec does not have a Wait for Completion input, which forces me
to add a delay before verifying the file copied correctly.

So, does anyone know of a Copy VI that will allow me to silently
overwrite that will work in 5.1.1?


Thanks,

Tim
0 Kudos
Message 1 of 4
(2,738 Views)
Hi,
actually this VI works in very simple way. First it checks if file exists in target directory. If so it deletes it and then copies the new version there.
So you can write such a VI by yourself.

I've converted this VI in LV5.0 version. The file is attached.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 4
(2,738 Views)
Thanks for the VI, Oleg. However, my boss is real paranoid about making the copy/overwrite operation atomic. He's afraid some developer may come in later on and modify the VI such that it deletes more than it should.

Thanks again.

Tim
0 Kudos
Message 3 of 4
(2,738 Views)
Hi Tim,

you can do two things securing your VIs:

1: Protect your VI by setting a password for the block diagram. Use a random password to avoid someone will guess it. Advantage: your customer can convert the VI to a newer LV version. Disadvantage: With brute force attack you can get the password.

2: Remove the block diagram. Advantage: Noone can change the VI. Disadvantage: This VI cannot be converted to another LV version.

Be sure to do this only in your deployment not in your source.

Protect yourself in the contract with your customer. Deny any guarantee if your customer will change your source code.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 4
(2,738 Views)