BeanShell supports the notion of a current working directory for
commands that work with files. The cd() command can be used to change the
working directory and pwd() can be used to display the current value.
The BeanShell current working directory is stored in the variable bsh.cwd.
All commands that work with files respect the working directory, including
the following:
As a convenience for writing your own scripts and commands you can use
the pathToFile() command to translate a relative file path to an absolute
one relative to the current working directory. Absolute paths are unmodified.
When working with path names you can generally just use forward slashes
in BeanShell. Java localizes forward slashes to the approprate value
under Windows environments. If you must use backslashes remember to
escape them by doubling them:
dir("c:/Windows"); // ok
dir("c:\\Windows"); // ok