Copy Root Directory - Not individual folders

What is the problem you are having with rclone?

Likely me being special.

I want to copy the root directory of for example D:/ of a local machine to G Drive.

I just need the command instead of doing each folder individually within the directory

Thank you

Run the command 'rclone version' and share the full output of the command.

rclone v1.60.1

  • os/version: Microsoft Windows Server 2008 R2 Datacenter Service Pack 1 (64 bit
    )
  • os/kernel: 6.1.7601.24546 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.3
  • go/linking: static
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

I have tried the following Variances to initiate full root directory copy

Rclone copy -P "D:\**" "RemoteName:D New" -vv
Rclone copy -P "D:\#" "RemoteName:D New" -vv

The rclone config contents with secrets removed.

[RemoteName]
type = drive
client_id = Redacted
client_secret = Redacted
scope = drive
token = {"access_token":"Redacted","expiry":"2022-12-05T10:02:50.6730424+10:00"}
team_drive = Redacted
root_folder_id = 


A log from the command with the -vv flag

2022-12-05 09:33:49 ERROR : Attempt 1/3 failed with 1 errors and: directory not
found
2022-12-05 09:33:49 ERROR : Local file system at //?/D:/**: error reading source
 root directory: directory not found
2022-12-05 09:33:49 DEBUG : Google drive root 'D New': Waiting for checks to fin
ish
2022-12-05 09:33:49 DEBUG : Google drive root 'D New': Waiting for transfers to
finish
2022-12-05 09:33:49 ERROR : Attempt 2/3 failed with 1 errors and: directory not
found
2022-12-05 09:33:50 ERROR : Local file system at //?/D:/**: error reading source
 root directory: directory not found
2022-12-05 09:33:50 DEBUG : Google drive root 'D New': Waiting for checks to fin
ish
2022-12-05 09:33:50 DEBUG : Google drive root 'D New': Waiting for transfers to
finish
2022-12-05 09:33:50 ERROR : Attempt 3/3 failed with 1 errors and: directory not
found
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         1.7s
2022/12/05 09:33:50 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         1.7s

2022/12/05 09:33:50 DEBUG : 4 go routines active
2022/12/05 09:33:50 Failed to copy: directory not found

hi,
might try testing using rclone ls, as it lists the files to be copied, without copying them.

rclone does not accept wildcards in the source
so need to use filters,
for example below,
rclone ls d:\ --include="/#/**"

Thanks,

I can get:

rclone ls d:\ --include="**"

To list all the directories and files within, however when i attempt to bring this into the live environment using

Rclone copy -P "D:\--include="**"" "RemoteName:D New" -vv

I get a "Directory not found"

What am i missing

try
rclone copy -P "d:\" --include="**" "RemoteName:D New" -vv --dry-run

Same Again,

Directory not found

run the command, post the full output

2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=** RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 1/3 failed with 1 errors and: directory not
found
2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=** RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 2/3 failed with 1 errors and: directory not
found
2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=** RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 3/3 failed with 1 errors and: directory not
found
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.0s
2022/12/05 10:11:03 Failed to copy: directory not found```

have to post the full output, including the top lines.

Round Two:

c:\rclone>rclone copy -P "d:" --include="" "RemoteName:D New" -vv --dry-run
2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=
RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 1/3 failed with 1 errors and: directory not
found
2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=** RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 2/3 failed with 1 errors and: directory not
found
2022-12-05 10:11:03 ERROR : Local file system at //?/D:/" --include=** RemoteName:D
: error reading source root directory: directory not found
2022-12-05 10:11:03 ERROR : Attempt 3/3 failed with 1 errors and: directory not
found
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 0.0s
2022/12/05 10:11:03 Failed to copy: directory not found

fwiw, not sure the point of --include="**"

this works for me
rclone copy -P "d:\\" --include="**" "wasabi01:zork" -vv --dry-run
so try
rclone copy -P "d:\\" --include="**" "RemoteName:D New" -vv --dry-run

1 Like

Fixed

Correct code that works is

rclone copy -P "d:" --include="**" "RemoteName:D New" -vv --dry-run

Thanks for your help

Your way works too!

Thanks mate

d: is not correct, need to use d:\

a bit techical, but
d: points to the current working directtory in d: drive.
d:\ points to the root of the d: drive

1 Like

I am using your d:\\ in the live environment

Appreciate your help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.