Error 8 When Copying a File in LabVIEW

Updated Aug 30, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am using the LabVIEW Copy Function to programatically copy a file to a destination as shown below: 

And I receive the following error pointing to the destination path even though I have all the permissions on this destination path:

Solution

The Copy function is used in LabVIEW to copy a file from a destination folder to a source folder. In this case, even though the error points to the destination path where the error is occurring, the error is actually generated in the source path. 
  • Make sure that the Windows User has all the permissions available on the file you are trying to copy. To verify the permissions of the Windows user, follow these steps:
  1. Right-click the file you want to check.
  2. Click on Properties.
  3. Click the Security tab on top of the window.
  4. Click the user you want to check under the 'Group or user names' section. 
  5. Verify the permissions under the 'Permissions for ...' section.
  6. In the next picture you can see the properties of the SYSTEM user for this file:
  • Please ensure the files in the source folder do not contain any shortcut files. If you require to copy or move shortcut files from the source folder, you can use System Exec VI function. Below is an example:
example-copy-command.png
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.