>>>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.
>
>ADIR() gives me Last Modified Date but doesn't give me Last Accessed Date which is available in NetWare. I thought there may be some easy way to capture to result of the command line into an array, file, table, anything useful. I'm totally ignorant to syntax and useage for WSH, I've read alot about it and probably will dig into sometime this year but was hoping to do this in FoxPro.
Joe,
Look at my Windows File names in the download section (Win32 and Other APIs). It retrieves the creation, modification and last accessed date/times. Note, however, that the last access date/time will always show as midnight.
George
Ubi caritas et amor, deus ibi est