Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- :: Variables
- set driveletter=%1
- set RCport=%2
- :: Check that the folder is valid, otherwise wait until it is
- echo " "| set /p dummyName=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 %driveletter%: is now ready^^!
- )
- echo You may use the cloud-drive normally while the cache is being warmed up...
- FOR /F "tokens=* USEBACKQ" %%F IN (`rclone rc vfs/refresh recursive^=true --rc-addr localhost:%RCport%`) do (
- set output=%%F
- :: Check if any line in command output contains OK and then display message
- if not "!output:OK=!"=="!output!" echo Cache warmup for !driveletter!: OK^^!
- )
Add Comment
Please, Sign In to add comment