Hello there I am new to rclone and using it successfully but I would like to automate much better my moving of files.
Let me explain please, I am completely newbie.
First thing : I run rclone on windows using the linux WSL and it works great.
I have a remote cloud that I was able to setup that I named Cloud1.
I use the following command when I want to move files from a share folder of the cloud to my local pc (opening Unbuntu with admin) :
rclone move cloud:share /home/local -v -P
This command is working great but I would like to add two things :
Move the files to D:/Pictures instead of home.
Save this routine into a bat file that i would execute from windows I guess by double clicking on the bat file it would open Unbuntu and run the move command in background.
I searched in this forum but didn't find anything, I know I am very new to this so excuse the silly question in case.
# which user is running the script
whoami
# move files
rclone move cloud:share /mnt/d/Pictures -vv -P --dry-run
#pause the script to view the output
read -p "pause"
c:\data\rclone\doit.lnk
set target to c:\windows\system32\wsl.exe /mnt/c/data/rclone/doit.sh
not sure what that means?
in your case:
on windows, no need to run the script with admin privileges
Thanks for the help. I have a few questions, just curious and learning...
what is the purpose of this : #pause the script to view the output
read -p "pause"
you store the script into c:\data\rclone\ but actually I don't have such a folder, by running Unbuntu on Windows where should I store the script please ?
I wrote run as admin because when I used to do it manually, I right click on the unbuntu icon and run as admin from windows environment.
by default, the script would exit immediately, might miss the output of the rclone command.
very helpful to catch syntax errors and other mistakes.
you can store them any place you want.
make sure to change the shortcut's target to match.
as you are new to scripts, very easy to make a mistakes.
when you run scripts as admin/root, can do a lot more damage. in your case, should not be required.
also, that is why i added --dry-run to your rclone command.