Upload only new or updated files using putfiles - WeOnlyDo Discussion board

Upload only new or updated files using putfiles (General questions)

by Brad Jensen, Thursday, September 15, 2011, 01:40 (4818 days ago) @ wodDamir

I've looked for sample code on your site to do this, which I think would be a common thing. I want to use putfiles to upoload a set of directories and contents, doing the same thing each day.

Obviously I only want to upload the item if it is new or the file date/time has changed.

Can I use putfiles to do this, then within the loopitem event do a getattributes on the remote (server) file so I can compare it to the file I think I want to upload? Or will doing the getattributes break the putfiles process - causing it to stop after the frist file?

If this method won't work, does anyone have an example of iterating thru directories on the local server, then uploading only the new or changed files to the ftp server, preserving the directory structure?


Complete thread: