|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Folder Management > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.GetFolder
Retrieve Current AIU Folder Path
Intention
GetFolder Command: Retrieving the Current AIU Folder Path
The GetFolder command retrieves the current folder path used by the AIU system for file operations, such as saving API keys.
This is useful for verifying or utilizing the folder location in your scripts.
It’s part of the AIU - OpenAI API suite.
The GetFolder command fetches the current value of the AIU_Folder, which is the default directory for AIU file operations.
You can store this path in a variable or, if no variable is specified, it will be placed on the Top of Stack (TOS).
Retrieving the AIU folder path is valuable for:
•Verification: Confirm the default location where files (e.g., API keys) are stored.
•File Operations: Use the path for reading or writing files in scripts.
•Debugging: Ensure the folder aligns with your script’s expectations.
The command can be called with or without a variable to store the result.
By default, AIU_Folder is set to ?exeloc\AIU_Folder\ unless changed via AIU.SetFolder.
Example Usage
AIU.GetFolder|$$FOL
DBP.Current AIU Folder: $$FOL
AIU.GetFolder
POP.$$FOL
DBP.Current AIU Folder from Stack: $$FOL
The returned path always ends with a backslash (\).
Illustration
┌───────────────┐
│ AIU_Folder │
├───────────────┤
│ ?exeloc\... │
└───────────────┘
A simple representation of retrieving the AIU_Folder path.
Syntax
AIU.GetFolder[|P1]
AIU.Get_Folder[|P1]
Parameter Explanation
P1 - (Optional) The variable where the folder path will be stored. If omitted, the path is placed on the Top of Stack (TOS).
Example
AIU.GetFolder|$$PAT
DBP.AIU Folder: $$PAT
AIU.GetFolder
POP.$$STA
DBP.Stack Retrieved Folder: $$STA
ENR.
Remarks
- The default folder is initialized to ?exeloc\AIU_Folder\ unless modified by AIU.SetFolder.
- The returned path always includes a trailing backslash for consistency.
Limitations
- The command only retrieves the current folder path and does not verify its existence or accessibility.
See also: