LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get directory from file path

Solved!
Go to solution

How do I get the derectory from a filepath?

Eg.: c:\Users\mko\Documents\test\data.txt

should give me the directory 

c:\Users\mko\Documents\test\

0 Kudos
Message 1 of 8
(7,647 Views)

How do I get the derectory from a filepath?

Eg.: c:\Users\mko\Documents\test\data.txt

should give me the directory 

c:\Users\mko\Documents\test\

0 Kudos
Message 2 of 8
(7,641 Views)
Solution
Accepted by topic author Michael.Koppelgaard

Did you try Strip Path primitive?

For your case use 2 strip path primitives one after the other

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 8
(7,635 Views)
Solution
Accepted by topic author Michael.Koppelgaard

Hi P@Anand,

 

using StripPath just once should be enough to strip the filename from the path…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(7,633 Views)
Solution
Accepted by topic author Michael.Koppelgaard

When I replied I guess I saw the expected path was "c:\Users\mko\Documents".

 

Yeah you are right using one strip path is sufficient

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 8
(7,630 Views)
0 Kudos
Message 6 of 8
(7,632 Views)

Duplicate Post

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 8
(7,624 Views)

Just what I wanted 🙂

0 Kudos
Message 8 of 8
(7,613 Views)