Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
28.1k views
in General by (140 points)
If so where can I find some example VB .Net sample code for a directory listing and Getting a file from a Unix server??

I am Newbie level.

10 Answers

0 votes
by (162k points)
I'm not a VB programmer, but there are a few snippets in various threads that might help, e.g.

http://www.enterprisedt.com/forums/viewtopic.php?t=281

Anyone want to contribute an example?

If so where can I find some example VB .Net sample code for a directory listing and Getting a file from a Unix server??

I am Newbie level.
0 votes
by (162k points)
I've just posted a VB example in this thread:

http://www.enterprisedt.com/forums/viewtopic.php?t=287

If so where can I find some example VB .Net sample code for a directory listing and Getting a file from a Unix server??

I am Newbie level.
0 votes
by (260 points)
i'm a really newbie here. do anyone know how can i make the current directory up. probably a button for backdirectory.

FtpConnection1.ServerAddress = TextBox5.Text
FtpConnection1.ServerPort = Integer.Parse(TextBox2.Text)
FtpConnection1.UserName = TextBox3.Text
FtpConnection1.Password = TextBox4.Text

' Connect, get files and close
FtpConnection1.Connect()
ListBox1.Items.AddRange(FtpConnection1.GetFiles())

i just make it until here.how can i make an updirectory so that i can go to the upper root.please help me. thanks in advance.
0 votes
by (162k points)
ChangeWorkingDirectoryUp() will move you up a level.
0 votes
by (260 points)
yes i'm aware that detftp got that funtion.but i dont know how to put that code in the listbox so that the listbox can bring directory up to root. i'm using vb.net 2005.thanks for the reply.
0 votes
by (51.6k points)
It sounds like what you're trying to do is very similar to what the FTPRemoteFileList of edtFTPnet/Express does. If so, you might save yourself time and money by purchasing it (from only $99) rather than struggling with your own implemention using the free version. Also, it works asynchronously (i.e. in the background) so your application will be a lot more responsive.

If not then could you please explain a little more what you'd like to do? I don't quite understand what you mean by "so that the listbox can bring directory up to root".

- Hans (EDT)
0 votes
by (260 points)
after i connect to the server using edtftp.all the server data will be listed in the listbox.then i want a button to back the listbox directory to root folder. hope u understand.if not let me know. not too good with my english..; )
0 votes
by (51.6k points)
Oh, you want to change directory to the root directory. That's easy - just do:
ftpConnection.ServerDirectory = "/";


- Hans (EDT)
0 votes
by (260 points)
ive tried but it seems its not working.thanks anyway man for ur help.ill try the other way
0 votes
by (51.6k points)
If you need further help then please post the log. You can enable logging using:
EnterpriseDT.Net.Ftp.FTPConnection.LogToConsole = true;
EnterpriseDT.Net.Ftp.FTPConnection.LogLevel = EnterpriseDT.Util.Debug.LogLevel.Debug;


- Hans (EDT)

Categories

...