You could use the ShortName, not shure how to do it in VB9.0, as you already know, but it should be very simple, in FoxPro I would do this
loFSO = CREATEOBJECT('Scripting.FileSystemObject')
loFile = loFSO.GetFile(GETFILE())
? loFile.ShortName
? loFile.ShortPath
ie:
For
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf I will get
C:\PROGRA~2\MI0788~1\V3.5\SAMPLES\NORTHW~1.SDF
There is still no guarantee that it will be shorter than 260 chars but you've got more chances that it'll work
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges