kvarnerexpress 0 Report post Posted February 17, 2005 Anyone know of a good way to sort a list of files if I give a path like C:\myDirectory\*.cmd that will return a sorted list of all cmd files in the directory? I don't need in a CFile object or anything like that, just a list of strings. Even all files in the directory would be fine, I can filter out non-cmd files after that.Thanks in advance. Share this post Link to post Share on other sites
kristofer.hoch 0 Report post Posted February 17, 2005 Anyone know of a good way to sort a list of files if I give a path like C:\myDirectory\*.cmd that will return a sorted list of all cmd files in the directory? I don't need in a CFile object or anything like that, just a list of strings. Even all files in the directory would be fine, I can filter out non-cmd files after that. Thanks in advance. 51541[/snapback] You can't do what you are asking unless you write a program to do it. You can use Perl pretty easily for something of this nature. You can also use C/C++ (CFile). Do you have an idea of how you want to do this (write a program, run a windows command)? Thanks, ----------------- Kristofer Hoch "TIMTOWTDI (tim-toe-dee): There is more than one way to do it -- Perl Motto" Share this post Link to post Share on other sites
kristofer.hoch 0 Report post Posted February 17, 2005 You can't do what you are asking unless you write a program to do it. You can use Perl pretty easily for something of this nature. You can also use C/C++ (CFile). Do you have an idea of how you want to do this (write a program, run a windows command)? Thanks, ----------------- Kristofer Hoch "TIMTOWTDI (tim-toe-dee): There is more than one way to do it -- Perl Motto" 51554[/snapback] Hi there, Apparently you want to use C/C++ being that you posted this in the C/C++ Programming forum! DOH! I should have looked first, but I am new at this bb stuff. I have done something like this before, but it was several years ago. I did use the Win32 API, so I think I can reproduce it. It was done in C, not C++ so it should work with either compiler. Give me a bit of time to try to remember. Thanks ----------------- Kristofer Hoch "int main(int argc, char *argv[]){ ... }" Share this post Link to post Share on other sites