here's an api function that gives you a short path from a file path:

vb Code:
  1. Public Class Form1
  2.  
  3.     Declare Function GetShortPathName Lib "kernel32" _
  4.                     Alias "GetShortPathNameA" (ByVal lpszLongPath As String, _
  5.                     ByVal lpszShortPath As String, ByVal cchBuffer As Integer) As Integer
  6.  
  7.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8.         Dim shortPath As New String(" "c, 256)
  9.         GetShortPathName("long path here", shortPath, 256)
  10.         MsgBox(shortPath.Trim)
  11.     End Sub
  12.  
  13. End Class