I’m uploading files into FTP using this code:
http://msdn.microsoft.com/en-us/library/ms229715.aspx.
It’s all good, but I think using this synchronizing two folders will be not so comfortable.
My FTP directory tree is: /categories/ => /category1, /category2, /category3 and there are tons of files : )
On my local HDD my directory tree is the same, but there are only few files in these folders. Task for my script will be checking if particular file exists on FTP server in the same location, if not, upload it. That’s it.
Can you suggest me solution or direction which should I go to?
You could rethink your design a bit. Instead of only comparing the file and folder structures you can use the eventhandler FileSystemWatcher and “sync” (ie upload to ftp) files directly when created.