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

We appreciate your patience as we improve our online experience.

Example Code

Get/Set Current Directory in LabVIEW

Code and Documents


Download All


This VI demonstrates how to set or get the current directory in which LabVIEW is working. It calls the functions SetCurrentDirectoryA and GetCurrentDirectoryA located inside the kernel32.dll Windows file. You can use this example as a subVI in your application. If you wire a path to the VI, it sets the current directory to that path. If you do not wire a path, the VI returns the current directory.


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.