CurDir Function [Runtime] /text/sbasic/shared/03020403.xhp Sun Microsystems, Inc. converted from old format - fpe
CurDir function CurDir Function [Runtime] Returns a variant string that represents the current path of the specified drive.
Syntax: CurDir [(Text As String)] Return value: String Parameters: Text: Any string expression that specifies an existing drive (for example, "C" for the first partition of the first hard drive). If no drive is specified or if the drive is a zero-length string (""), CurDir returns the path for the current drive. $[officename] Basic reports an error if the syntax of the drive description is incorrect, the drive does not exist, or if the drive letter occurs after the letter defined in the CONFIG.SYS with the Lastdrive statement. This function is not case-sensitive. Example: Sub ExampleCurDir Dim sDir1 as String , sDir2 as String sDir1 = "c:\Test" sDir2 = "d:\private" ChDir( sDir1 ) msgbox CurDir ChDir( sDir2 ) msgbox CurDir end sub