Check if remote file exists before upload - WeOnlyDo Discussion board

Check if remote file exists before upload (wodSFTP / wodSFTP.NET / wodSFTPdll)

by wodSupport, Wednesday, September 10, 2014, 17:16 (3725 days ago) @ Limey

Hi.

I suggest you use GetAttributes method

http://www.weonlydo.com/SFTP/Help/wodSFTP-GetAttributes.html

for each file before the upload. If it returns an error - then file doesn't exist.

But you cannot use it in LoopItem event, since LoopItem fires while some other method is processing. You must wait for Done to complete in order to execute GetAttributes, so you should do it before GetFiles/PutFiles.

Kreso


Complete thread: