Vfs/refresh with dir on windows?

What is the problem you are having with rclone?

Does the dir switch work on windows when using vfs/refresh? I always get a "file does not exist" even for the path used to perform the mount.

What is your rclone version (output from rclone version)

rclone v1.53.1

  • os/arch: windows/amd64
  • go version: go1.15

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10,64bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone rc vfs/refresh dir=Z:\mntSecV\secV --rc-addr=localhost:5573

A log from the command with the -vv flag

# port 5573 is intentional.
2020/12/17 12:17:22 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "rc" "vfs/refresh" "dir=Z:\\mntSecV\\secV" "--rc-addr=localhost:5573" "-vv"]
{
        "result": {
                "Z:\\mntSecV\\secV": "file does not exist"
        }
}
2020/12/17 12:17:23 DEBUG : 4 go routines active

the dir is relative to the remote path, not to the location of the mounted drive letter.
do not know you exact setup and you did not post the mount command but try dir=/mntSecV/secV

for example,
the mount command is
rclone mount wasabicrypten07data: x: --rc --rc-no-auth

and this is the refresh command

rclone rc vfs/refresh  dir=/en07data/data/rclone/backup -vv 
2020/12/17 12:53:01 DEBUG : rclone: Version "v1.53.3" starting with parameters ["C:\\data\\rclone\\scripts\\rclone.exe" "rc" "vfs/refresh" "dir=/en07data/data/rclone/backup" "-vv"]
{
	"result": {
		"/en07data/data/rclone/backup": "OK"
	}
}

and this is a view from windows explorer

image

Ah, that makes sense. I feel pretty dumb not even thinking to try refreshing that as the target. I'm sure that must be all it is.
Thanks!

sure, try it and let's see what happens...

Ok, I got it now, thanks! I see why I thought it was the local path now. If anyone else gets stuck with this as I did:

I didn't get the perspective from the documentation right, to tell that the path you specified is relative to the perspective of the local mount point or the remote, and thought it mean local to where rclone is executing. It's from the remote as asdffdsa pointed out, but you don't need to specify the remote label. I kept trying "secV:/#stage" initally, once I understood the context, "/#stage" was all I needed, which for me, was implicitly "secV:/#stage".

This makes sense now that I've got the perspective correct, since the mount would already have the context of the remote, so it is just a little different than most other times with rclone when a path without a remote would be assumed to be local to the rclone context, but here, it's local from the perspective of the remote (the "remote:" designation is implicit). I always used the presence of something with a colon to know when I was working with a remote, but that doesn't apply here.

tldr: when refreshing, don't use your local mount path, and don't specify the remote designator. i.e. if you want to refresh the path remote:/refreshMe, you just specify "dir=/refreshMe", which implicitly is "remote:/refreshMe".

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.