I had to copy a 30 Gb folder which contains folders and subfolders and a lot of files but the copy failed at about 22 Gb copied.

I would like to create a application that compare each files from the source folder with the destination folder and copy the files that changed and the one that don't exist.

The problem is that I don't know how to do the loop to get all files.

I know how to loop, but in the main loop, I'll have to add another loop, and another one in this one ...

I don't know how to proceed.

Can I have an example on how to list all files ?