Gcrpyt Mount hangs while opening folder

Scripting to do precaching:

While the command you need to send it only really what I described above (and you could easily do it manually with a single copy-paste), you probably will want to automate it.

For Linux-spesific scripting, I'd suggest stealng (ahem, borrowing :P) Animosity's script. He shares them freely here.


For Windows (which I suspect do you apply to you but I will add it for the sake of completeness/illustration), here is an example of what I use:

@echo off
:: If window is not minimized, restart it as minimized
::if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

::Variables
set driveletter=%1
set RCport=%2

:: Check that the folder is valid, otherwise wait until it is
echo Waiting for %driveletter%: to be ready ...

:LOOP1
vol %driveletter%: >nul 2>nul
if errorlevel 1 (
echo " "| set /p dummyName=.
timeout /t 1 > nul
goto LOOP1
) else (
echo.
echo Drive %driveletter%: OK!,
)

echo.
echo Warming up cache...
echo This may take a few minutes to complete
echo You may use the cloud-drive normally while this runs
echo.

echo Awaiting completion-message from RC...
rclone rc vfs/refresh -v --fast-list recursive=true --rc-addr localhost:%RCport% --rc-user test --rc-pass test --timeout 1h

::alternative slower method that does not use the remote control
::echo.
::echo verifying old-school ...
::%driveletter%:
::dir /s >nul

echo.
echo Cache warmup for %driveletter%: OK!
echo.

echo Closing windows in 5 seconds...
timeout /t 5 >nul

Not as complicated as it looks. The only really crucial bits are the loop to wait for the mount to be ready - and the vfs/refresh command. The rest is just details.

Called from the mounting script like so (truncated example):

::Variables
set driveletter=X
set remotename=TD1Crypt

start /b rclone mount blah blah....

::Start cache warmup
call scripts/VFSCacheWarmup.bat %driveletter% %RCport%