Current-Directory
Last Update: 11/18/2024
The default prompt in the Command Window (Open by menu Window: Command Window, or Alt + 3) is ">>", but you could have the current working folder as prompt, by right-clicking inside the right panel of Command Window and choosing Preference... from context menu. Regardless of what prompt is, it is this "Current Directory" (CD) where Origin first looks to find the script file that you are running. If the current directory is not changed, Origin looks first for the script file in the User Files Folder and then in the Origin program folder.
To change the current working folder, you can use the cd X-Function. Also, Origin has provided the cdset X-Function for managing pre-defined paths or favorite folders, so to easily change the current working folder. For example:
cd; // output the current working folder cd c:\aaa; // set c:\aaa as the current working folder cdset 4; // set c:\aaa to pre-defined paths list, with index of 4 cdset; // output the pre-defined paths cd 2; // set the 2nd pre-defined path as the current working folder
Note:
Keywords:OGS, script, LabTalk