Advanced File VIs and Functions

LabVIEW 2015 Help

Edition Date: June 2015

Part Number: 371361M-01

»View Product Info
Download Help (Windows Only)

Owning Palette: File I/O VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Advanced File VIs and functions to manipulate files, directories, and paths.

Palette ObjectDescription
Array of Strings to PathConverts an array of strings into a relative or absolute path.
Check if File or Folder ExistsChecks whether a file or folder exists on disk at a specified path. This VI works with standard files and folders as well as files in LLB files.
Compare Two PathsCompares Path 1 to Path 2 and returns a relative path between the two paths, the common path between the two paths, and a Boolean that indicates whether the paths are on the same path hierarchy level.
CopyCopies the file or directory that you specify in source path to the location that you specify in target path. If you copy a directory, this function copies all its contents recursively to the new location. You cannot use this function to copy files into or out of an LLB.
Create File with Incrementing SuffixCreates a file and appends an incrementing number suffix to the filename if the file already exists at a specified path. If the file does not exist, this VI creates the file without appending an incrementing number suffix to the filename.
Create FolderCreates the appropriate folder specified by path.
DeleteDeletes the file or directory specified by path. This function does not work for files inside an LLB.
Deny AccessReopens the instance of the file specified by refnum to temporarily change what read or write access is denied to other refnums, VIs, or applications.
File DialogDisplays a dialog box with which you can specify the path to a file or directory.
File/Directory InfoReturns information about the file or directory specified by path, including its size, its last modification date, whether it is a directory, whether it is a shortcut, and the resolved path if the file or directory is a shortcut. This function does not work for files inside an LLB.
Flush FileWrites all buffers of the file identified by refnum to disk and updates the directory entry of the file associated with refnum.
Generate Temporary File PathReturns a unique file path to the temporary directory. This VI only returns a path. It does not create the temporary file.
Get File ExtensionReturns the file extension, without the period (.), of a file you specify.
Get File PositionReturns the position of the current file mark of the file identified by refnum relative to the beginning of the file.
Get File SizeGets the file size of file. This function does not work for files inside an LLB.
Get PermissionsReturns the owner, group, and permissions of the file or directory specified by path. This function does not work for files inside an LLB.
Get Type and CreatorReads the type and creator of the file specified by path. type and creator are four-character strings. This function does not work for files inside an LLB.
Get Volume InfoReturns information about the volume containing the file or directory specified by path, including the total storage space provided by the volume and the amount free in bytes.
List FolderReturns two arrays of strings listing the names of all files and folders found in path, filtering both arrays based upon pattern and filtering the filenames array based upon the specified datalog type.
MD5Checksum FileComputes the MD5 message-digest of a file. The MD5 message-digest is a 128-bit number displayed in lowercase hexadecimal format.
MoveMoves the file or directory that you specify in source path to the location that you specify in target path. If you move a directory, this function moves all the contents of the directory recursively to the new location. You cannot use this function to move files into or out of an LLB.
Path to Array of StringsConverts a path into an array of strings and indicates whether the path is relative.
Path To StringConverts path into a string describing a path in the standard format of the platform.
Path TypeReturns the type of the specified path, indicating whether it is an absolute, relative, or <Not A Path>.
Preallocated Read from Binary FileReads binary data from a file and places the data into an array that you have already allocated without incurring a copy of the data. Unlike the Read from Binary File function, this function avoids run-time memory allocations.
Recursive File ListLists the contents of a folder or LLB.
Refnum to PathReturns the path associated with the specified refnum.
Set File PositionMoves the position of the current file mark of the file identified by refnum to the position indicated by offset (in bytes) according to the mode in from.
Set File SizeSets the file size of file by setting the end-of-file marker to size bytes from the beginning of the file. This function does not work for files inside an LLB.
Set PermissionsSets the owner, group, and permissions of the file or directory specified by path. This function does not work for files inside an LLB.
Set Type and CreatorSets the type and creator of the file specified by path. type and creator are four-character strings. This function does not work for files inside an LLB.

Only Mac OS X supports setting the type and creator of files.
String To PathConverts a string, describing a path in the standard format for the current platform, to a path.


SubpaletteDescription
Datalog FunctionsUse the Datalog functions to open and close datalog files, read from and write to datalog files, get and set datalog file positions, and get and set the number of datalog records.
Packed Library VIsUse the Packed Library VIs to get and return data from a packed project library.
Write Filters VIsUse the Write Filters VIs to protect volumes from unwanted modifications. You can enable, disable, and configure write filters for touch panel devices.

WAS THIS ARTICLE HELPFUL?

Not Helpful