simple FTP app?

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I would like to create a simple FTP application, a program to take
files from:

\\server\share
take all *.jpg files and move them to an outside ftp server for
example:

ftp.add.ress.here\data\

and then I would like to actually put files into a dated folder...for
example:

20080311
and if the folder does not exist, create it, this would be based on
the current date.
so for example if I run this on 03/10/2008 i would like it to create a
folder based on the date plus one day 20080311

any ideas?
 
Hi Jason,

Have a look at http://www.indyproject.org

You can download the indy sockets component and use it as follows:

Dim ftp As New Indy.Sockets.FTP

ftp.Host = "www.yourftpserveraddress.com"
ftp.Username = "YourFtpUsername"
ftp.Password = "YourFtpPassword"

' Connect to FTP server
ftp.Connect()

' Use PASV mode
ftp.Passive = True

' Change directory
ftp.ChangeDir("SomeDirectory")

' Upload a file
ftp.Put("ThePathToYourFile")

ftp.Disconnect()

That kind of thing would handle the FTP side of your question.

--

Rich

http://www.badangling.com
....talking pollocks since 1996
 
Jason,
Try this:

Dim client As New WebClient

client.Credentials = New NetworkCredential(FTPUserName,
FTPPassword)
client.UploadFile(path, filename)
client.Dispose()

Siv
 
There is a nice, well behaved upload on PSC that does FTP. I dl'd it
and use it in a project I am writing. I upload a file to a site as
backup, daily, from the program. Works fine.

Search PSC in .NET for KFTP. You will get source to build a .dll and a
test program to check it out and use as code samples. Be sure to read
the readme.txt for the (easy) steps to perform in order to make this
happen.

KFTP is not my work but is a very nice FTP wrapper for .NET services.
Thanks to the author for making this source code available.

Mike
 
Back
Top