API Documentation > CorelDRAW > 2025-v26 > CorelScriptTools > ICorelScriptTools
CorelScriptTools.GetCurrFolder method
Gets Current Folder
Syntax:
Function GetCurrFolder() As String
Remarks:
The GetCurrFolder method returns the name of the active Windows folder and path. The GetCurrFolder method returns a string variable that is passed the name of the active Windows folder and path. You can set the active folder using the SetCurrFolder statement. In Corel SCRIPT version 7.0, the GetCurrFolder function and the SetCurrFolder statement replaced the CurrFolder statement.
Examples:
In the following code example, the first line sets the active folder. The second line assigns the active folder to a string variable. The third line assigns a file name to a string variable. In the last line a string variable is assigned a value which is made by combining the folder and file string variables.
SETCURRFOLDER "c:\corel\graphics8\scripts\" folder$ = GETCURRFOLDER ( ) MyFile$ = "\MyScript.csc" MyPathFile = folder$ & MyFile&