Greetings all,
Ok, here is what I am trying to do. I need a Slick-C macro (for Windoze) to take a starting path specified as an argument, traverse it and all of its subdirectories, and open a window/buffer for each file with the file extension also specified as an argument. However, at this point, the file type is irrelevant. I thought it would be an easy task, but not so. As far as opening the window/buffer once a file is found, I don't have a problem; traversing the subdirectories is a different story. The following excerpted lines of code illustrate the problem that I am having.
#include "slick.sh"
defmain()
{
parse arg(1) with StartPath .;
_str temp = StartPath :+ '\*.* +D +P';
_str filename = file_match(temp,1);
while(filename != '')
{
_str attrs = file_list_field(filename, DIR_ATTR_COL, DIR_ATTR_WIDTH);
messageNwait('name found='filename);
filename= file_match(' +d -p 'filename,0);
}
messageNwait('done');
}
When I comment out the _str attrs = line, it lists every file in the directory, as I would expect, including the subdirectories. With that line in place, however, it lists the file c:\StartDir\.\ only, and then immediately goes to 'done'. Any ideas?
Thanks,
Clark