Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    40

    Unanswered: convert file path ?

    Hi,

    how can i convert a long filepath and name to dos standards ?

    For instance :

    Original filepath : d:\test test\originalfile.pdf
    Coverted filepath : d:\testte~1\origin~.pdf

    Thanks in advance.

    E.Traas
    Bye Erwin

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    add this to a Module:
    Code:
    Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
    Public Function path8dot3style(strLongFullPath As String) As String
        Dim lenBuf As Long
        Dim strBuf As String
        strBuf = String$(165, 0)
        lenBuf = GetShortPathName(strLongFullPath, strBuf, 164)
        path8dot3style = Left$(strBuf, lenBuf)
    End Function
    should convert all to 8.3

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •