Error 6: Generic File I/O Error in LabVIEW

Updated Oct 20, 2020

Reported In


  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional
  • LabVIEW Runtime

Issue Details

I am receiving Error 6 in LabVIEW:

LabVIEW: Generic File I/O error.

When running an executable made with Application builder, I get a Generic File I/O error. What can I do to fix this?



Error 6, or Generic File I/O Error, is a common error that is generated when a file operation in LabVIEW or the user's code fails to execute. 

Try the following steps to troubleshoot this error:
  • Confirm that all the files developed and used are locally saved and can be accessed by LabVIEW (i.e. VI's produced are not in the Program Files folder in the C drive)
  • Check to make sure there is enough available space on the disk.
  • File systems have limitations on the maximum number of files per folder (regardless of how much disk space that is available).
    • FAT16 - 512 files per folder.
    • FAT32 - 65,534 files per folder.
    • NTFS - 4,294,967,295 files per folder.
    • Periodically deleting, or moving files to a new folder will reduce the risk of exceeding the above limits.
  • The number of files you can store in one folder also depends on the file name length:
    • FAT32 allows 65,534 files, if the filename is smaller or equal eight characters (e.g. "12345678.txt").
    • Filenames exceeding eight characters the long filename system applies. The filename "abcdefghijklm.txt" has 13 characters plus file extension and will use three entries. It will create one entry for a short version of the file name and two for the long file name, thus just 21,844 (65534/3 entries) files could be stored. For a fast estimation see this external calculator.
  • Enable sharing on any folders accessed over the network.
  • Make sure file paths or directories LabVIEW is accessing do not exceed the maximum length for system file paths.
  • Remove or replace any control characters from string controls or constants that are used to designate a file path. See LabVIEW Error 1 or 6: Input Parameter is Invalid to learn more about this case.
  • When you are deleting a directory, either:
    • Delete its contents and sub-folders, then the directory.
    • Wire a True to the entire hierarchy input of the Delete function. 
  • In Linux, you need to open a pipe in Read Mode before trying to open it in Write Mode.
  • On Linux Real Time targets (e.g. cRIO and sbRIO) ensure that the lvuser account has access permission to a drive, folder, or file. This especially important if you add external storage with a USB memory stick, or  NI 9803. Use the chmod command to change permissions. 
  • Anti-Virus can sometimes lock files that have recently been created. Try adding a Wait (ms) block set at 100 ms before calling the close function. Also, you can try disabling Anti-Virus to see if that affects the issue. 
This error can also be caused by a corrupt executable file. Please try and open a backup or an different version of the file. 

Additional Information

This error is caused by an issue with LabVIEW's interaction with the file system.