filter: Added --files-from-raw flag

--files-from parses input files by ignoring comments starting with # and ;
and stripping whitespace from start and end of strings.

The --files-from-raw flag was added that reads every line from the file ignoring
comment characters and not stripping whitespace while maintaining
backwards compatibility.

Fixes #3762
This commit is contained in:
Ankur Gupta
2020-04-03 15:06:24 +05:30
committed by GitHub
parent 3911a49256
commit 08c2cb784f
6 changed files with 119 additions and 23 deletions

View File

@@ -132,13 +132,13 @@ Eg
"this file contains a comma, in the file name.txt",6
Note that the --absolute parameter is useful for making lists of files
to pass to an rclone copy with the --files-from flag.
to pass to an rclone copy with the --files-from-raw flag.
For example to find all the files modified within one day and copy
those only (without traversing the whole directory structure):
rclone lsf --absolute --files-only --max-age 1d /path/to/local > new_files
rclone copy --files-from new_files /path/to/local remote:path
rclone copy --files-from-raw new_files /path/to/local remote:path
` + lshelp.Help,
Run: func(command *cobra.Command, args []string) {