Using the %currentlocaldir Variable

Top  Previous  Next

 

The current local working folder (or directory) is maintained in an internal variable named %currentlocaldir.

 

WORKINGDIR "c:\temp"

DISPLAY %currentlocaldir

 

Whenever changing the working folder in script functions or called scripts, it is recommended that the original folder always be restored prior to returning as shown in the following sample code.

 

FUNCTION things todo

;; save current working folder

SET savdir = %currentlocaldir

;; do whatever...

WORKINGDIR "c:\temp"

;; ...

;; restore working folder

WORKINGDIR savdir

RETURN