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)
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
rclone.exe copy folder1 folder2
rclone.exe copy folder3 folder4
rclone.exe copy folder5 folder6
timeout /T 5 > nul
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
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
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.