Suggestion: Files locked


#1

Hello,

My case:
In the files folder, a user had opened an excel file and even after closed the file, Windows kept one copy the temporary and hidden file. The RClone script was stopped because it stopped in this file.

Suggestion:
Would it be possible to create a parameter (for example: -skip-locked) in case RClone detects that the file is in use “skip” this file?

Thank you!


#2

Rclone should have just skipped that file (with an ERROR) and carried on with the rest of the sync. Is that not what happened?


#3

Hello,
This is the end of my log file.

2019/02/03 14:43:06 INFO : One drive root ‘DRAGIOVANNA’: Waiting for checks to finish
2019/02/03 14:43:06 INFO : One drive root ‘DRAGIOVANNA’: Waiting for transfers to finish
2019/02/03 14:43:06 ERROR : Attempt 3/3 failed with 2 errors and: failed to open source object: open \?\D:\DOCTOS\GESTAO\DIGITALIZADOS […] Docto.XLSX: O arquivo já está sendo usado por outro processo.
2019/02/03 14:43:06 Failed to copy: failed to open source object: open Docto.XLSX: O arquivo já está sendo usado por outro processo.

No such information was created as:
“Transferred:, Errors:, Checks: and Elapsed time:”

Is this the default?
or summary is not generated in this case?

Is that my script uses this final information to detect the end of the log file and since it was not generated, the script got “frozen”.

Thanks!


#4

What is the actual full script you are running?


#5

I use Windows and am testing an app I’ve developed. It reads the log to check the uploads …rclone02

And as there is no final summary it has left no return of the log.

I use the summary as a ‘flag’ that processing has ended. was the only standard I could define. If there was another end-of-file flag would be great, rsss …


#6

Can you run the same command via the command line and test and validate the output?


#7

Yes, I will simulate here. It will take a while because there are too many files, ok?
Forgive my English … not good!


#8

Tests completed …
Is it possible to send the 2 complete log files as attachments?
(is there information in the logs that I do not want to be
public)


#9

I don’t think so, but they are your logs so you may want to be sure.


#10

It’s because directory references are true client names … and I would not like to expose them


#11

So did the sync spit out a summary screen at the end ?

What command did you run?

Did you see the same errors?

It’s almost impossible to troubleshoot without seeing a log unfortunately.


#12

Hmmm, ok … I was talking about ALL the contents of the files …

Here are the commands:
rclone copy “D: \ bk” “onedoctos: DOCTOS” --filter-from = inc \ nobkp.txt --size-only --ignore-case --log-file = copy01.txt --log-level INFO - -progress

Did not generate the abstract at the end …

the last lines of the log.
2019/02/04 18:16:20 INFO: One root drive ‘DOCTOS’: Waiting for checks to finish
2019/02/04 18:16:20 INFO: One root drive ‘DOCTOS’: Waiting for transfers to finish
2019/02/04 18:16:20 ERROR: Attempt 3/3 failed with 182 errors and: generalException: Could not find property named ‘quota’ on type ‘oneDrive.item’.
2019/02/04 18:16:20 Failed to copy: generalException: Could not find property named ‘quota’ on type ‘oneDrive.item’.

Strange that this log did not give the file locked error of excel, it looks like it was aborted before reaching it.Capturar

Summary appears at the prompt but not at the end of the log file


#13

Example:

felix@gemini:~$ rclone copy /etc/hosts GD: --log-level INFO --log-file /tmp/blah.log
felix@gemini:~$ cat /tmp/blah.log
2019/02/04 16:15:33 INFO  :
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 1 / 1, 100%
Transferred:            0 / 0, -
Elapsed time:       800ms

#14

Summary appears at the prompt but not at the end of the log text file


#15

I’m showing you in my output that it is in the log file.

“cat” just outputs the contents of a file.


#16

Ok, I know how to get the contents of the log file. The point is that the summary is not generated at the end … is this normal? In case of errors the summary is not generated?


#17

It sounds like your program is coded to look okay the end for completion messages but then you’re relying on placement in a log to determine if it’s ended. You should be looking at the process termination. Or maybe I misunderstood?


#18

That’s right, it could be my mistake.
Any suggestions will be greatly appreciated!

Basically:

  1. I create a log using ‘check’.
  2. I see the number of files to send by checking “Sizes differ” and “File not in”
  3. When I find in the log the conditions on the line: “NOTICE” and “differences found” I consider that it has reached the end of the file.
  4. Then, in real time I follow the Log “copy” or “Sync”
    In the case of “Copied (new)”, “Copied (replaced existing)” or “Deleted”, I consider 1 file.

But when errors happen there is no way to compute the difference between the quantities …

I think I’m being very primary in my idea, but it was the way I found it … if errors do not happen, everything is fine, rsss …

Any suggestion?

Very Thanks!

I thought about showing the percentage and a progress bar mainly when I do the downloads, because they can be time consuming with larger files …


#19

Any suggestion?
Do you think that in this way I would have any success or I should abandon the idea.
Thank you.

I’m just developing this app because I have not found any that have an administrator password, and that’s important to me.


#20

Can you explain more here?