Table of Contents

GETLONGPATH method (Filesystem)

Description

Converts a legacy DOS short "8.3" style file path to a full one.

Syntax

LongPath = Exec_Method( "FILESYSTEM",  
                        "GETLONGPATH", 
                        ShortPath )

Parameters

NameRequiredDescription
ShortPathYesSpecifies the short path to convert.

Returns

The converted long path if successful, or null if the method fails. The FILEOPRESULT property may be used to obtain more details regarding the failure.

Remarks

The GETLONGPATH method is basically a wrapper around the GetLongPath Windows API function, so it is worth examining at the documentation for this on the MSDN website to get a better idea of the capabilities of this method.

Example

 
// Use GETLONGPATH to convert a short path

   ShortPath = "c:\progra~1\my_app"

   LongPath  = Exec_Method( "FILESYSTEM", "GETLONGPATH", ShortPath )

   

   If BLen( LongPath ) Then

      // LongPath should be: "C:\Program Files\my_app"

   End Else

      ErrorInfo = Get_Property( "FILESYSTEM", "FILEOPRESULT" )

      ErrorCode = ErrorInfo<PS_FOR_ERRORCODE$>

      ErrorText = ErrorInfo<PS_FOR_ERRORTEXT$>

   End
 
 
 

See Also

GETSHORTPATH method, FILEOPRESULT property.