Batch script create idea

What is the problem you are having with rclone?

there is no problem with rclone

What is your rclone version (output from rclone version)

1.55.1

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

windows 7

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

google drive

if i want to copy multiple files i have to add each line. something like this.


rclone copy "remote:file1" "C:\Download"
rclone copy "remote:file2" "C:\Download"
rclone copy "remote:file2" "C:\Download"

i want to make a batch script like first line i write the rclone copy and in middle just the file name. something like any idea please?

rclone copy "remotename"
{file name in each line}
"C:\Download"

you try try
https://rclone.org/filtering/#include-from-read-include-patterns-from-file

create a text file, let's call it filter.txt

file1
file2

and test the filter with
rclone ls remote: --include-from=filter.txt

1 Like

thank you so much, filter is working. file list is showing fine. however i tried to download to my local disk and getting following error

rclone copy "remote:  --include-from=filter.txt"  "C:\download"

2021/07/14 12:56:29 ERROR : : error reading source directory: directory not foun
d
2021/07/14 12:56:29 ERROR : Attempt 1/3 failed with 2 errors and: directory not
found
2021/07/14 12:56:29 ERROR : : error reading source directory: directory not foun
d
2021/07/14 12:56:29 ERROR : Attempt 2/3 failed with 2 errors and: directory not
found
2021/07/14 12:56:29 ERROR : : error reading source directory: directory not foun
d
2021/07/14 12:56:29 ERROR : Attempt 3/3 failed with 2 errors and: directory not
found
2021/07/14 12:56:29 Failed to copy with 2 errors: last error was: directory not
found

try
rclone copy "remote:" --include-from=filter.txt "C:\download" -v --dry-run
and read the output.
if it looks good, then remove --dry-run and run again

1 Like

with or without dry run, it's stuck. not showing anything after this. may be reading full folder or something. i tried "remote:Test" --include-from=filter.txt "D:\Main\test\" -v -- dry-run only gave error "Replacing invalid characters
in..." and end the task without downloading the file.

rclone copy "remote:" --include-from=filter.txt "D:\Main\test\" -v --
dry-run
2021/07/14 13:17:52 NOTICE: Local file system at : Replacing invalid characters
in "\\Main\\test\" -v --dry-run" to "\\\\?\\D:\\Main\\test_ -v --dry-run"
2021/07/14 13:17:53 NOTICE: test: Duplicate directory found in source - ignoring

the \" at the end of the path can be a problem on windows.

you can use
"D:\Main\test"
"D:\Main\test\\"
D:\Main\test\
D:\Main\test

1 Like

thank you so much.

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