>I don't understand. I think you need to post some code
The correct location is when the loFile.Length is used, which is an object from FileInfo.
Here is a portion of the code:
loDirectoryInfo = New DirectoryInfo(cDirectory)
Try
loFiles = loDirectoryInfo.GetFiles(cFilter)
For Each loFile In loFiles
loRow = oDataSet.Tables(0).NewRow
loRow("Extension") = loFile.Extension
loRow("LastUpdate") = loFile.LastWriteTime
loRow("Name") = Trim(loFile.Name)
loRow("Size") = loFile.Length
So, the last line is where the problem is. As soon as I have a file name having more than 160 characters, loFile.Length will generate an error.
And, it is not about the loRow("Size") field. I tried to dump loFile.Length into a double variable and it was the same.