From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy files in a shared folder

HI all,

I have an application in which I have to copy a file in a shared folder on a different PC over the same network. Can anyone suggest me How to do this? 

Labview user
0 Kudos
Message 1 of 5
(2,700 Views)

Well, the easy approach is to generate the file locally and then use the COPY function to add the file to the network drive.

But there are some caveats:

- How do you make sure that you have the correct permission to write the file there?

- How do you make sure that the path to the shared drive is valid (e.g. mounted drive vs. absolute path)?

- How do you plan to react if the file already exists on the network drive?

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,684 Views)

Hi Norbert_B

thanks for your answer. 

However apart from your described caveats I have on more

How to get acknowledgment when file has been written. Can you suggest som way?

Labview user
0 Kudos
Message 3 of 5
(2,660 Views)

@Aojha wrote:

Hi Norbert_B

thanks for your answer. 

However apart from your described caveats I have on more

How to get acknowledgment when file has been written. Can you suggest som way?


You will typically get an error if the file was not written.  But I want to say I ran into a situation where it didn't.  Can't remember.  Just check for an error on the copy.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,652 Views)

Hi guys,

I'm trying to figure it out as well. I need to give a password before copying files, how can I do it in labview?

0 Kudos
Message 5 of 5
(2,623 Views)