>Is there a way of getting the size of subdirectories
>
>I tried
>
>Run dir x:\foxdev\* /s >x:\temp\dirsize.txt
>
>but this will not work from within foxpro
>
>any Ideas please
Sorry - I hit tab when I should have hit return the fiorst time. The example below is corrected.
Try using the WSH Scripting.FileSystemObject; you can rerieve a Folder object using GetFolder and then step through the SubFolders collection to retrieve their sizes:
oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFolder=oFSO.GetFolder('C:\MyFolderWithSubFolders')
IF oFolder.SubFolders.Count > 0
FOR EACH oSubFolder IN oFolder.SubFolders
? oSubFolder.Name, oSubFolder.Size
ENDFOR
ENDIF