In what order does NextCloud upload files?

Hi, we use NextCloud for uploading a lot of files and folders. When upload is running and I check the Windows Explorer, I see that it seems like the NextCloud Windows client is not uploading files by filename A → B or 01 → 02.

Looking at the folder it seems to randomly upload files as the blue and green checkmarks are all mixed throughout all the files. The date and time of these files is about the same. Maybe that has something to do with it.

The complaint I got is like this: When we upload a folder with a 1000 items, sorted by filename from 0001 to 0999 the receiving end sees the folder coming in totally random. So the folder has gaps in missing files, and only until upload is fully done the folder is complete, but it does not fill the folder in alphabetical order. For us this is a problem as the receiving end wants to view the progress and can check if everything is send over OK by monitoring the filenames coming in and then checking a list for completion… file 0001, then 0002, then 0003 etc. Right now everything is send at random.

Could that be related to the timestamp being the same? Hour:Minute ? 17:45 PM as all files are copied to disk within the same minute?
Hope someone has an idea

this is a screenshot during upload
image

The timestamps are usually very precise and you OS just shows the minutes by default. With the powershell, you can sort them:

ls | Where-Object { -not $_.PSIsContainer } | Sort-Object LastWriteTime | Select-Object Name, LastWriteTime | Format-Table -AutoSize

Then you know if it takes the last modification date into account or not.

The client does by default parallel upload of 5 files at a time. I don’t know how the list of all files is split, e.g. if you have 25 elements, if the first upload thread uploads files 1-5, or 1,6,11,16, 21. Now imagine, the second scheme is used, if all files have the same size and upload at the same speed, they should appear in the right order. But if the sizes differ or the speeds vary, then it will mess up the order. You can change the MAX parallel via system variable (default is 6 and not 5 as I was supposing in my example):
https://docs.nextcloud.com/desktop/3.13/advancedusage.html#environment-variables

Just for progress monitoring, I don’t really see what this might change. If you need e.g. have the first files first, because e.g. you’d like to do some processing of the first files, I’d check to create the first 100 files, then wait a bit, and then do this by batches of 100 or so.
Or if you really need it one by one, then you could where you create the files, directly use webdav to upload the files one-by-one.

1 Like