Rclone tree command

What is the problem you are having with rclone?

I find the rclone tree command very useful for viewing and saving the contents of a cloud storage but if I wanted to do the same with my external hard drives what would be the right command?

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

rclone v1.59.1

  • os/version: Microsoft Windows 10 Home 21H1 (64 bit)
  • os/kernel: 10.0.19043.1889 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.5
  • go/linking: static
  • go/tags: cmount

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

1Fichier, Google Drive, local

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

rclone tree local:O:\AUDIO -o orico.txt

The rclone config contents with secrets removed.

Name                 Type
====                 ====
1Fichier             fichier
gdrive               drive
orico                local

A log from the command with the -vv flag

2022/08/12 19:25:17 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "tree" "local:O:\\AUDIO" "-o" "orico.txt" "-vv"]
2022/08/12 19:25:17 DEBUG : Creating backend with remote "local:O:\\AUDIO"
2022/08/12 19:25:17 DEBUG : Using config file from "C:\\Users\\xxxx\\.config\\rclone\\rclone.conf"
2022/08/12 19:25:17 Failed to create file system for "local:O:\\AUDIO": didn't find section in config file

normally, no need to create a remote for local
just use the path as is, same as with any command line app.

rclone tree O:\AUDIO

I had done that but:

2022/08/12 20:56:04 ERROR : FOLDER1/FILE  Part 2 : error listing: directory not found
2022/08/12 20:56:04 ERROR : FOLDER1/FILE Part 1 : error listing: directory not found
2022/08/12 20:56:04 Failed to tree with 2 errors: last error was: directory not found

can you run the command with -vv and post the entire output

2022/08/12 20:57:46 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "tree" "O:\\AUDIO" "-vv"]
2022/08/12 20:57:46 DEBUG : Creating backend with remote "O:\\AUDIO"
2022/08/12 20:57:46 DEBUG : Using config file from "C:\\Users\\xxxx\\.config\\rclone\\rclone.conf"
2022/08/12 20:57:46 DEBUG : fs cache: renaming cache item "O:\\AUDIO" to be canonical "//?/O:/AUDIO"
2022/08/12 20:57:47 ERROR : FOLDER1/FILE  Part 2 : error listing: directory not found
2022/08/12 20:57:47 DEBUG : 3 go routines active
2022/08/12 20:57:47 Failed to tree: directory not found

what is the output of
rclone tree . --level=1 -vv

O: - is that a network drive or what?

2022/08/12 21:03:19 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "tree" "." "--level=1" "-vv"]
2022/08/12 21:03:19 DEBUG : Creating backend with remote "."
2022/08/12 21:03:19 DEBUG : Using config file from "C:\\Users\\XXXX\\.config\\rclone\\rclone.conf"
2022/08/12 21:03:19 DEBUG : fs cache: renaming cache item "." to be canonical "//?/C:/Users/XXXX/Desktop/rclone-v1.59.0-windows-amd64"
2022/08/12 21:03:19 DEBUG : Stat: filePath="/"
2022/08/12 21:03:19 DEBUG : >Stat: fi=, err=<nil>
2022/08/12 21:03:19 DEBUG : ReadDir: dir=/
2022/08/12 21:03:19 DEBUG : >ReadDir: names=[1Ficheir directories.txt 1Fichier_video.txt GUIDE README.html README.txt gdrive directories.txt gdrive_video.txt git-log.txt orico.txt myemail@gmail.txt rclone.1 rclone.exe rclone.old.exe], err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\1Ficheir directories.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=1Ficheir directories.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\1Fichier_video.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=1Fichier_video.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\GUIDE"
2022/08/12 21:03:19 DEBUG : >Stat: fi=GUIDE, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\README.html"
2022/08/12 21:03:19 DEBUG : >Stat: fi=README.html, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\README.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=README.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\gdrive directories.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=gdrive directories.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\gdrive_video.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=gdrive_video.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\git-log.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=git-log.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\orico.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=orico.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\myemail@gmail.txt"
2022/08/12 21:03:19 DEBUG : >Stat: fi=myemail@gmail.txt, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\rclone.1"
2022/08/12 21:03:19 DEBUG : >Stat: fi=rclone.1, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\rclone.exe"
2022/08/12 21:03:19 DEBUG : >Stat: fi=rclone.exe, err=<nil>
2022/08/12 21:03:19 DEBUG : Stat: filePath="\\rclone.old.exe"
2022/08/12 21:03:19 DEBUG : >Stat: fi=rclone.old.exe, err=<nil>
/
├── 1Ficheir directories.txt
├── 1Fichier_video.txt
├── GUIDE
├── README.html
├── README.txt
├── gdrive directories.txt
├── gdrive_video.txt
├── git-log.txt
├── orico.txt
├── myemail@gmail.txt
├── rclone.1
├── rclone.exe
└── rclone.old.exe

1 directories, 12 files
2022/08/12 21:03:19 DEBUG : 2 go routines active

This is the contents of the rclone folder!!!

O: is my external hard disk, from which I want to retrieve the list of files.

from that same command prompt, can you access the dirs.
does these work - dir o:\ and dir o:\audio

Yes i can access!

then rclone should be able to access
rclone lsd o:\ -vv

Yes rclone lsd works but not rclone tree

2022/08/12 21:18:22 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "lsd" "o:\\audio" "-vv"]
2022/08/12 21:18:22 DEBUG : Creating backend with remote "o:\\audio"
2022/08/12 21:18:22 DEBUG : Using config file from "C:\\Users\\XXXX\\.config\\rclone\\rclone.conf"
2022/08/12 21:18:22 DEBUG : fs cache: renaming cache item "o:\\audio" to be canonical "//?/o:/audio"
          -1 2020-11-02 09:59:18        -1 #BD09
          -1 2017-09-16 15:43:17        -1 #BD10
          -1 2017-09-16 16:23:54        -1 #BD11
          -1 2021-10-06 19:08:04        -1 #BD12
          -1 2021-07-01 21:54:14        -1 #BD13
          -1 2021-04-04 14:18:03        -1 #BD14
          -1 2017-09-26 09:15:49        -1 #BD15
          -1 2019-12-10 11:46:33        -1 #BD16
          -1 2017-09-28 09:09:36        -1 #BD17
          -1 2017-09-28 10:10:24        -1 #BD18
          -1 2017-09-28 11:21:16        -1 #BD19
          -1 2017-09-28 12:11:44        -1 #BD20
          -1 2020-01-02 17:37:20        -1 #BD21
          -1 2019-11-20 15:13:05        -1 #BD22
          -1 2017-10-11 09:24:44        -1 #BD23
          -1 2017-10-12 08:58:32        -1 #BD24
          -1 2017-10-13 09:00:31        -1 #BD25
          -1 2020-10-03 16:12:28        -1 #BD27
          -1 2020-09-22 15:41:26        -1 #BD28
          -1 2017-10-14 10:45:33        -1 #BD29
          -1 2017-10-14 11:30:59        -1 #BD30
          -1 2017-10-17 09:04:43        -1 #BD31
          -1 2019-02-05 09:21:20        -1 #BD32
          -1 2017-12-27 15:45:45        -1 #BD33
          -1 2022-06-03 09:27:20        -1 #BD34
2022/08/12 21:18:22 DEBUG : 2 go routines active

try rclone tree o:\audio -vv

C:\Users\xxxx\Desktop\rclone-v1.59.0-windows-amd64>rclone tree o:\audio -vv
2022/08/12 21:25:39 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "tree" "o:\\audio" "-vv"]
2022/08/12 21:25:39 DEBUG : Creating backend with remote "o:\\audio"
2022/08/12 21:25:39 DEBUG : Using config file from "C:\\Users\\xxxx\\.config\\rclone\\rclone.conf"
2022/08/12 21:25:39 DEBUG : fs cache: renaming cache item "o:\\audio" to be canonical "//?/o:/audio"
2022/08/12 21:25:39 ERROR : FOLDER1/FILE  Part 2 : error listing: directory not found
2022/08/12 21:25:39 DEBUG : 3 go routines active
2022/08/12 21:25:39 Failed to tree: directory not found

Nope same issue. It seems that the error is caused by this path FOLDER1/FILE Part 2 : error listing: directory not found

maybe the external drive has some sort of damage/corruption

try this, rclone ls o:\ -vv, if the debug log is very log, can snip it.

How to snip it?

btw it read all the content to me correctly. The last 2 lines are:

2022/08/12 21:33:50 DEBUG : 2 go routines active
2022/08/12 21:33:50 Failed to ls with 8 errors: last error was: directory not found

not sure what the exact issue is.

perhaps a corrupt file allocation table
i would run chkdsk o:

It worked by deleting the folders/files that were generating error. Thank you!

did chkdsk o: return with found no problem?

I didn't execute chkdsk o:
The drive is old, surely it would have found bad sectors, and your advice pointed me in the right direction.

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