How to output file listing from lsd to an output file instead of to the console?

What is the problem you are having with rclone?

ls or lsd output the listing to the windows command prompt. Is there an Rclone option to redirect the listing (not just errors) to a file instead? I don't mean using a windows redirection operator, I mean is there a built in Rclone option to specify that the output should go to file?

I have tried --log-file logtest.txt with all the different log levels, but only error and info information goes to the log file - the actual file or dir listing does NOT go to the log file (it still goes to the windows command prompt).

What is your rclone version (output from rclone version)


Which OS you are using and how many bits (eg Windows 7, 64 bit)

Win10 64bit

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)

rclone.exe lsd <remote>: --log-file logtest.txt --log-level DEBUG

The rclone config contents with secrets removed.

Not reqd for this question.

A log from the command with the -vv flag

2021/06/21 12:56:51 DEBUG : Using config file from "D:\\OneDrive\\_CONTROLLER\\_RCLONE\\rclone.conf"
2021/06/21 12:56:51 DEBUG : rclone: Version "v1.55.1" starting with parameters ["D:\\OneDrive\\_CONTROLLER\\_RCLONE\\rclone.exe" "lsd" "<remote_obfuscated>:" "--log-file" "logtest.txt" "--log-level" "DEBUG"]
2021/06/21 12:56:51 DEBUG : Creating backend with remote "<remote_obfuscated>:"
2021/06/21 12:56:52 DEBUG : 6 go routines active

No, I think not. The actual result from commands like this is not handled by logging but written directly to stdout. This means you can set --log-file file1.txt and then redirect output to file2.txt, and you get logs and results into separate files.

Hey, thanks for replying.

Yeah, it's the "redirect output to file2.txt" that I was hoping rclone had a function/flag for. I know I can do a redirection using the Windows command prompt, but I'm looking for a way to do it via rclone. I'm just a bit surprised there doesn't seem to be a function for that, considering rclone offers various listing functions (ls, lsd etc) and one use case is to capture that output to a file.