ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write file to current directory

Hello,

What I want to do is very simple:
I want to write to a file in the current directory.

I'm using Write Characters To File.VI.
This VI needs a file path. I just want to specify the file name and I want the file to be written in the application's directory.
I have tried the current VI's path with the strip path but it returns the .llb path in that contains my VI.
I also tried the String to Path and the path constant but I cannot just enter the file name, I have to specify for exemple c:\mydir\myfile.txt, else I have the error "Error 1 occured at Open File
LabView: An input parameter is invalid"

Is there a way to do this?

Thanks a lot
Martin
0 Kudos
Message 1 of 2
(3,063 Views)
If your VI is in an .llb, just using another strip path will return the directory.
0 Kudos
Message 2 of 2
(3,063 Views)