Hello all,
I have a program loop like this; the example is in vb;
public sub executeFtp()
items = fc.Dir(path)
if recursive then
For Each fileOrFolder As FTPFile In Items
If Not fileOrFolder.Dir
Else
End if
Next
else
fc.Get(path)
end if
end sub
The problem with the 2nd last line (fc.get..) is that 'path' might be a folder as well. In that case I want this method to call itself 1 time for this folder (i.e., only download files but no subfolders in that folder). To do that, I have to predetermine whether the specified path is a file or a folder.
What would be the best way to handle this?
Thanks in advance.