LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 118 over network

Hi,

 

I keep on experiencing error 118 (Cannot find specified file or path) when trying to write to a .tdms file over a windows network.  I have the Enum constant set to 'open or create' on the tdms write function, so it should create the file. I have no idea why I get this error, I've triple checked to make sure the directory is correct.

 

I can read a spreadsheet over the network just fine. Its only when I try to write .tdms that I get the error.

The only difference is the spreadsheet open is a path constant=>open spreadsheet, and the .tdms save location is:

 

path=>string, add user input with 'build text' vi,=>path=>tdms open=>tdms write, close, etc..

I've checked that 'build text' output is correct path too. I just use it to modify the name of the file to create.

 

 

 

The folder I'm trying to save to is shared, and I've check marked the 'allow other computers to make changes to files' box under the folder properties. In fact, I can transfer, save, modify, and create any other type of file in that directory over the network using windows explorer.

 

Please help, I've run out of things to try.

 

Thanks,

 

Ryan

0 Kudos
Message 1 of 4
(5,494 Views)

Hi Ryan,

 

Let me try doing some help.

 

The only scenario I can see error 118 when creating a .tdms file over a Windows network is the sub-folder specified in your path doesn't exist. For example, you specify the path "\\ServerName\data files\data.tdms", if the "data files" folder doesn't exist, then you will get error 118. Because TDMS Open will create the data.tdms only when the "data files" folder exists.

 

I also try reproducing your issue locally, but it seems my VI run successfully on my machine and .tdms file can be created over a windows network. Please refer to the attachment for the simple VI. In my VI, I used the "build text" to generate the filename, and concatenate the network folder path and filename(generated by "build text" vi) using "build path" vi, and then input the path to TDMS Open(a little bit difference with you description).

 

Hope this VI can give some help to solving your issue. If you still have problem, could you provide your VI if it's convenient so that we can do further help!

 

Regards,

Tianbin

0 Kudos
Message 2 of 4
(5,431 Views)

I had been using a date stamp and extracting the year to be part of the filename, it turns out the date wasn't formatting correctly and was leaving a "/" in the file name, making it look for another folder. I was able to work around it though by doing a search and replace

0 Kudos
Message 3 of 4
(5,395 Views)

A huge thanks because you just really helped us 🙂

The problem was also with the "/" in the date format.

0 Kudos
Message 4 of 4
(5,376 Views)