02-02-2017 01:57 AM
hello,
I am not a great accustomed with Labwindows cvi.
We made some important measurement and I want to save the measurement file on a specific place in a network drive.
I would like
1- work on a current disk other than C (ex : FARADAY (Y:) a network hard)
2- create a directory and sub-directory tree with some name declared on the GUI interface
3- finally, create the file with its name declared on the GUI interface
Somebody can help me with a exemple, please?
Thanks in advance
christophe
02-02-2017 02:21 AM - edited 02-02-2017 02:24 AM
Hello Cristophe,
if you can let the user interactively choose the folder/file to work with you can use FileSelectPopup or DirSelectPopup to obtain the pathname.
Alternatively pathnamets can be built up by using MakePathname function.
You can also use SetDrive to make a specific drive the current one (e.g. the one FileSelectPopup starts with). In your case, to set drive Y: you need to call SetDrive (24); Starting with the current drive, you can navigate with the appropriate SetDir () calls and even create directories with MakeDir (), provided you have the necessary privileges to do so.
Regarding your last question, file I/O functions like fopen () of OpenFIle () do permit to create a new file with a given file/pathname.
Did you already tried to do something and have some specific question we can help you with?