A little batch script help - vfs refresh

Hi

Im really not too good at the whole batch script thing yet and trying to run a batch script, to refresh the vfs "cache" every xx hours/days. I can do that, but i would like to add a rerun if the first refresh doesnt return the "OK"

Here is what I'v got:

@echo off

output.txt (
start /d "c:\rclone" rclone -vvv rc vfs/refresh recursive=true --rc-addr=localhost:5573
)

I would also like to log the output of the batch and rclone that should return as seen below but it doesnt seem to do so :

> C:\rclone>rclone -vvv rc vfs/refresh recursive=true --rc-addr=localhost:5573
> 2020/01/13 09:09:51 DEBUG : rclone: Version "v1.46" starting with parameters ["rclone" "-vvv" "rc" "vfs/refresh" "recursive=true" "--rc-addr=localhost:5573"]
> {
>         "result": {
>                 "": "OK"
>         }
> }
> 2020/01/13 09:10:33 DEBUG : 4 go routines active
> 2020/01/13 09:10:33 DEBUG : rclone: Version "v1.46" finishing with parameters ["rclone" "-vvv" "rc" "vfs/refresh" "recursive=true" "--rc-addr=localhost:5573"]

Anyone happen to have made simular stuff?

You can just add --log-file and give it a location path and log file name that you want. An example Linux output would be:

felix@gemini:~$ rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 --log-file /tmp/test.log -vv