As you know Google Drive Desktop app ignores junction symlinks (atleast on Windows) created with mklink /J
I have a folder which is full of folders that are actually directory junction symlinks. Each folder is full of more folders which have non empty files in them.
rclone copy C:\NonSymlinkFolder remotename: -P
The above command, without any symlinks involved, will copy NonSymlinkFolder and its contents to the root of my Google Drive remotename by default. This is what I want to do with SymlinkFolder too.
However, if there is a symlink involved (below command) - RClone consistently only copies the contents of SymlinkFolder to the root of my remotename - instead of putting those files instead of a new folder called SymlinkFolder in the root of my remotename.
rclone copy C:\SymlinkFolder remotename: -L -P
What is your rclone version (output from rclone version)
rclone v1.56.0
os/version: Microsoft Windows 10 Enterprise 2009 (64 bit)
os/kernel: 10.0.19042.867 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.16.5
go/linking: dynamic
go/tags: cmount
Which OS you are using and how many bits (eg Windows 7, 64 bit)
See above
Which cloud storage system are you using? (eg Google Drive)
thanks for your response. I'm aware I can do this, however it is a workaround and not a fix for this change in behaviour
as I said in my post I have many symlink folders and it would be very tedious doing this for every individual file
rclone does what you are describing by default for normal folders without any path needing to be specified. It doesn't work for symlinks though for some reason
The behaviour change also affects rclone sync with symlinks. even though I do source then dest in the command, it shows the same symptoms of this issue - tries to sync the entire Google drive folder against my.local, resulting in mass deletion of my Google drive.
What more info would you like about the folders? I think I gave everything needed
perhaps i do not understand your example.
that command will not create a folder named NonSymlinkFolder in remotename
this is documented at https://rclone.org/commands/rclone_copy/
"it's the contents of source:path that are copied, not the directory name and contents."
i did a quick test
rclone lsd gdrive-a1b2:testfolder
rclone ls gdrive-a1b2:testfolder
rclone copy C:\NonSymlinkFolder gdrive-a1b2:testfolder -v
INFO : file.txt: Copied (new)
rclone lsd gdrive-a1b2:testfolder
rclone ls gdrive-a1b2:testfolder
1 file.txt
this can be seen in the debug log rclone copy C:\NonSymlinkFolder gdrive-a1b2:testfolder -vv will output Creating backend with remote "gdrive-a1b2:testfolder"
-- rclone copy C:\NonSymlinkFolder gdrive-a1b2:testfolder/NonSymlinkFolder -vv will output Creating backend with remote "gdrive-a1b2:testfolder/NonSymlinkFolder"
Ok, my apologies. Genuinely though, rclone copy has always copied the folder for me on local stuff (non symlinks), whether it be local to local, gdrive to local, local to gdrive. That's just how its been for me.
Ok so now I know that isnt intended behaviour - is there a flag or combo of flags I can use to automatically copy the directory structure? or foldername? So it is done automatically rather than manually specifying path for each new file added to the folder.
I had a very good look in the wiki but didn't find anything
set /p sourcename=Test
rclone copy C:\%sourcename% gdrive-a1b2:%sourcename%
rclone lsd gdrive-a1b2:Test
2021/08/30 18:47:41 ERROR : : error listing: directory not found
2021/08/30 18:47:41 Failed to lsd with 2 errors: last error was: directory not found
rclone ls gdrive-a1b2:Test
2021/08/30 18:48:01 Failed to ls: directory not found
<rclone copy command to do what i want>
INFO : Text.txt: Copied (new)
rclone lsd gdrive-a1b2:Test
rclone ls gdrive-a1b2:Test
1 Text.txt
So it creates a directory name/directory structure with the same name/directory structure as the source automatically by itself then puts the files i am copying in there