Include-from to include dirs without needed append /**

What is the problem you are having with rclone?

when using --include-from and i want to include certain dirs, i need to append /**
this works /a/**
this does not work /a/
this prevents me from using the output of lsf.

What is your rclone version (output from rclone version)

rclone v1.51.0

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

windows10.64

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

wasabi

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

rclone.exe sync C:/path/to/local/folder remote: --include-from=include.txt

this is the include.txt

/a/**
/b/

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/04/07 09:58:35 DEBUG : rclone: Version "v1.51.0" starting with parameters ["c:\data\rclone\scripts\rclone.exe" "sync" "C:/path/to/local/folder" "remote:" "--include-from=include.txt" "--log-level=DEBUG" "--log-file=C:\data\rclone\scripts\rr\other\test\log.include.txt" "--dry-run"]
2020/04/07 09:58:35 DEBUG : Using RCLONE_CONFIG_PASS password.
2020/04/07 09:58:35 DEBUG : Using config file from "c:\data\rclone\scripts\rclone.conf"
2020/04/07 09:58:35 DEBUG : b/b.txt: Excluded
2020/04/07 09:58:35 INFO : S3 bucket aliasremote: Waiting for checks to finish
2020/04/07 09:58:35 INFO : S3 bucket aliasremote: Waiting for transfers to finish
2020/04/07 09:58:35 NOTICE: a/a.txt: Not copying as --dry-run
2020/04/07 09:58:35 INFO : Waiting for deletions to finish
2020/04/07 09:58:35 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Transferred: 1 / 1, 100%
Elapsed time: 0.0s

2020/04/07 09:58:35 DEBUG : 5 go routines active
2020/04/07 09:58:35 DEBUG : rclone: Version "v1.51.0" finishing with parameters ["c:\data\rclone\scripts\rclone.exe" "sync" "C:/path/to/local/folder" "remote:" "--include-from=include.txt" "--log-level=DEBUG" "--log-file=C:\data\rclone\scripts\rr\other\test\log.include.txt" "--dry-run"]

you could just use the files contained within rather than the directories. i.e.

rclone lsf robgs:gp -R | rclone sync --files-from - robgs:gp robgs:gp1 --dry-run

of you can run it through a sed ( I just noticed you're on windows so 'sed' may not be an option but whatever is equivalent on windows) .

rclone lsf --dirs-only robgs:gp | sed 's~/$~/**~' | rclone sync --include-from - robgs:gp robgs:gp1 --dry-run

thanks,

this works for me.

rclone lsf --dirs-only C:/path/to/local/folder --absolute --max-depth=1 | wsl sed 's~/$~/**~' | rclone sync C:/path/to/local/folder remote: --include-from=- -vv

1 Like

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