>When I type !NDIR /SORT [some sortspec] in command window I can get response on FoxPro desktop ( as with most any DOS/NetWare commands) I am trying to get files in a directory that have not been accessed for more than 1 year. I can get the output on the screen but I need to redirect this output to a text file (and eventually a table) some my prg will use this list for archiving. I tried (probably not correctly) to accomplish this with SET DEVICE to file, SET ALTERNATE to file, SET PRINT ON with no luck.
Why not use ADIR()? Pull the file details into an array, which you could then put into a table if you like. Or look at the Windows Scripting Host Scripting.FileSystemObject or Shell.Application's NameSpace method, both of which will return Folder objects that can be traversed.