A1VBCode Forums

INET Folders


http://www.a1vbcode.com/vbforums/Topic25791.aspx

By Icecold - 9/25/2008

I am using Inet in vb6 to upload files to my FTP site.  I have no problems placing files on the FTP Site

but can't figure out how to create a folder

Can someone help me with some code to create a Newfolder if it doen't exist on the ftp site.

I would like to see if the directory exist on the FTP if not create a new directory then upload the file.

Is there something like filesystemobjects for FTP?

        If Not fs.FolderExists(path) Then

            fs.CreateFolder (path)
        End If

By Icecold - 9/26/2008

Ok I figured out how to create a folder or directory by using

FtpCreateDirectory hConnection, "testing"

My next part is to see if this folder or directory already exist

If it does then I don't need to create a new folder

else

FtpCreateDirectory hConnection, "testing"

end if

What should I use to see if it exist

Ftpsetcurrentdirectory or FTPgetcurrentdirectory.

and how should I use it.