Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.3k views
in .NET FTP by
Hi,

I just started using edtftp.net in a project and i must say it works perfectly so far. Thanks to all dev's.

The question I have now is this:
Now I'm using this code to upload a text file (where fc is a ftpclient object):
fc.Put(AppDomain.CurrentDomain.BaseDirectory +"snippets\\TextFile1.txt",GetSetting("ftpdirectory") + "/TextFile1.txt" );


In the real world scenario I'll need to upload every file under the snippets folder. I've tried with the path to the folder or a wildcard but that didn't work.
Is there a way to upload the entire contents of a folder in one go or will i have to loop through the files collection?

Thanks again for a great free (speech) product.

2 Answers

0 votes
by (161k points)
edtFTPnet is a thin layer over the FTP protocol, which doesn't allow for wildcarded uploads. You need to loop through the files collection.

This is a feature we are considering for future versions.

Hi,

I just started using edtftp.net in a project and i must say it works perfectly so far. Thanks to all dev's.

The question I have now is this:
Now I'm using this code to upload a text file (where fc is a ftpclient object):
fc.Put(AppDomain.CurrentDomain.BaseDirectory +"snippets\\TextFile1.txt",GetSetting("ftpdirectory") + "/TextFile1.txt" );


In the real world scenario I'll need to upload every file under the snippets folder. I've tried with the path to the folder or a wildcard but that didn't work.
Is there a way to upload the entire contents of a folder in one go or will i have to loop through the files collection?

Thanks again for a great free (speech) product.
0 votes
by
Thanks for the quick reply, you guys totally rule...

Categories

...