Hi all!
I have got a question but, first, I'll explain why I am using rclone.
I need a program to do 2 things:
Backup my local files to GDrive
Server-side copy files from a GDrive to another
For the first thing I tried to use "GDrive Backup and Sync" but it has some problems, so I found rclone
Well, I would like to let rclone work continuously but I've seen that this isn't possible. So, I was looking for a way to "automatize" rclone, like executing the command every hour, but without opening the cmd windows (that can be pretty annoying)
Can you please tell me how does this works?
I don't know the "cmd language.."
I mean, I understand the "looper" and "goto looper"
But... lsd? wasabieast2? timeout /T 5 > nul?
I mean, if you please can comment/explain I can also personalize this small "script"
Do you know if there is a way to execute the .cmd without opening the window? So, like a "silent" mode I don't know how to call it.. Just execute the program in the background
This works in this way
First of all, the first copy starts
When the first copy has finished his job, then the second copy starts
Same thing, when the second copy has finished his job, then the third copy starts
Then it will wait 5 second and loop, right? Each copy waits for the previous copy to finish, right?
I am not sure what that "hidden" box actually does to be honest... maybe it just hides the process or something.
But if you select that the user that runs the script is SYSTEM instead of your user then it will not show up at all. It will just work in the background. You can select this in task scheduler (first options screen).
I think I know what the problem is...
When you use a user account (like you normally would if you ran it in windows) the script will start in whereever the file was located.
But I think system account will always start in C:\windows\system32 - and there is no rclone.exe file here so it will get very confused and error/exit.
To fix that, just add a line that spesifically tells the script which folder it should be working in ( I have added an extra line at the top compared to the earlier example:
::First of all, go to the rclone folder
cd c:\rclone
:looper
rclone.exe copy folder1 folder2
rclone.exe copy folder3 folder4
rclone.exe copy folder5 folder6
timeout /T 5 > nul
goto looper
Protip - you can comment your own code for easier readability.
Any line that starts with :: or REM will be ignored by the program.
::This is a comment that does nothing
REM This is also a comment that does nothing
But a line like this in the code will error... because batch does not know what a "But" is ... juvenile snickering
Yes but..
Well, I already found out this thing, because the cmd wasn't working on startup.. So I changed the file with those extra 2 lines at the beginning
This is my full file
But the problem with SYSTEM user was still there
So, I google a little and found this
"Run whether user is logged or or not" yes, but without the second tick (Do not store password)
And now it works, it runs at startup without opening the cmd window
But also tried to make a second file to mount at startup
I have to understand how mount works, with cache etc... But this was a try
G:
cd G:\Programs\ProgrammiNonInstallati\rclone-v1.51.0-windows-amd64
At startup, same settings, it doesn't work if I set "Run whether user is logged on or not"
It works only with "Run only when user is logged on" but with this config the cmd window opens..
rclone mount "Roba - ccsf:" X:
my advice is get all your rclone command working 100% then work on task scheduler and starting apps at startup.
also, you do not need to restart the computer each time to test task scheduler.
enable run on demand then right click the task and click run.
if you want to run rclone mount, you should run it as system user, else you might be able to see and use the mount.