LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
NIExpert

Add a function to Change Directory

Status: New

I was recently trying to develop a function to navigate thru a deeply nested directory structure and came across system path length limitations which could potentially be addressed by use of a "change directory" function.

 

I realize I could use system exec with cmd /c cd <path>, but found this extremely slow

2 Comments
Petru_Tarabuta
Active Participant

I'm sorry but I don't fully understand. Can you elaborate please?

What exactly were you trying to do? What exactly would you like the Change Directory function to do?

wiebe@CARYA
Knight of NI

/I'm sorry but I don't fully understand.

 

Me neither.

 

If you're development path is too deep, you can use subst | Microsoft Learn.

 

You can set the current path, but it won't do anything in LabVIEW:

Directory.SetCurrentDirectory(String) Method (System.IO) | Microsoft Learn

SetCurrentDirectory function (winbase.h) - Win32 apps | Microsoft Learn

 

In the program, use the "start path" for file dialogs and Browse options>start path property for path controls... This only helps the users of a program, not the programmer...

 

It's annoying that the program and development share the same current path (see having two current paths - NI Community).