How to find out file path of file on a network share drive

filesystemsnetwork-sharenetworkingwindows-event-log

I am using a small .NET application which integrates a file into another application, however, I keep getting the following error in EventViewer (part of the .NET application):

"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."

I understand that the path must be too long but I would like to know exactly what this path looks like and I have no idea how to see that. The file is on a share drive across my network and here is what my path looks like (from the address bar in windows explorer):

\\server100\companyname\app\cmp\it_transactions\thisismyfilename.csv

This is clearly not longer than 260 characters, however, I'm curious to know what is before the \. Is there any way to find this out? Sorry if my terminology is wrong about this but I have very limited knowledge about networks and file shares/drives.

Thanks!

Best Answer

This error message will occur in case if the file path is not accessible by the System.IO namespace.Library. Try fetching the file path using the library Delimon.Win32.IO and this will overcome your issue. You can download the library from Microsoft.