Unpack directory names from a full directory path string.
str array = unpackdirs(dir_str)
Now the split function is available also, for getting at the components of a file path.
# This code gets each component directory of the
# current input file path.
@CODE
G("array") = unpackdirs(G("$input"));
"output.txt" << "file=" << G("$input") << "\n";
"output.txt" << "dirs=" << G("array") << "\n";
"output.txt" << "split=" << split(G("$input"),"\\") << "\n";
@@CODE
A sample output looks like:
file=c:\apps\myanalyzer\input\misc\xxx.txt
dirs=apps myanalyzer input misc
split=c: apps myanalyzer input misc xxx.txt