Re: How to find the size of all files on a directo - WeOnlyDo Discussion board

Re: How to find the size of all files on a directo (General questions)

by woddrazen, Thursday, October 11, 2007, 15:46 (6051 days ago) @ Unilars

Hi Lars,


There is no nice way to find size of remote folder because server show file size but unfortunately they don't have folder size.

I have try it with winSCP and same issue is there also.

Here is what you can try in wodFtpDLX:
[code]
...
dlx1.Blocking = True
dlx1.Connect

dlx1.ListDir /home/something/your folder

Dim i As Integer
Dim size As Long

For i = 0 To dlx1.DirItems.Count - 1
If dlx1.DirItems.Item(i).Type = typeFile Then
Debug.Print Filename: & dlx1.DirItems.Item(i).Name
size = size + dlx1.DirItems.Item(i).size
End If
Next i

Debug.Print Folder size is: & size & bytes
[/code]

Let us know how it goes.


Regards,
Drazen


Complete thread: