jared
(jared)
May 29, 2021, 3:16pm
1
What is the problem you are having with rclone?
i'm trying to sync a list of files, and only filter out those that have "2017" in the file name. It's not an rclone problem, it's a me problem cause i can't quite understand the unix codes for file name filtering.
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 10, 64 bit
Which cloud storage system are you using? (eg Google Drive)
OneDrive Business
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone sync --verbose --transfers=4 --include *.MOV --include "files that contain 2017 here" --max-size 250M "C:\Users\Jared\Pictures\Camera Roll" "C:\Users\Jared\Desktop\Backup"
A log from the command with the -vv
flag
there is no log yet, because i haven't succeeded
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 3:32pm
2
i always test filters using rclone ls
rclone ls --include="*2017*"
note: on windows, need to use double quotes "
, not single quote '
It's easy to test with rclone ls rather doing a sync.
felix@gemini:~/test$ rclone ls /home/felix/test
0 five2017five
0 four
0 one
0 three2017three
0 two
felix@gemini:~/test$ rclone ls /home/felix/test --include '*2017*'
0 five2017five
0 three2017three
Is that what you want to do? Only include files with 2017 in the name?
jared
(jared)
May 29, 2021, 3:54pm
5
asdffdsa:
i always test filters using rclone ls
rclone ls --include="*2017*"
note: on windows, need to use double quotes "
, not single quote '
hmm, not filtering as intened...
C:\rclone 1.54.1>rclone ls --include *.MOV --include="*2017*" "C:\Users\Jared\Pictures\Camera Roll"
72233619 20150511_003800938_iOS.MOV
66636031 20150605_010251000_iOS.MOV
13793156 20150615_155808804_iOS.MOV
34189351 20150615_155928983_iOS.MOV
250104294 20150619_210718001_iOS.MOV
772079054 20150619_211621454_iOS.MOV
183742902 20150710_203727373_iOS.MOV
292361932 20150712_014236151_iOS.MOV
233990321 20150718_160957259_iOS.MOV
147444357 20150719_210247865_iOS.MOV
29488199 20150720_001725175_iOS.MOV
43439207 20150720_001808393_iOS.MOV
144517641 20150720_001909250_iOS.MOV
58281717 20150720_002911724_iOS.MOV
227547621 20150803_015106582_iOS.MOV
125484959 20150803_021110934_iOS.MOV
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:00pm
6
seems to works for me.
rclone .\source
0 01.txt
0 2017b.txt
0 a2017.txt
0 c2017c.txt
1 folder/020172.txt
0 folder/03.txt
rclone ls .\source --include="*2017*"
0 2017b.txt
0 a2017.txt
0 c2017c.txt
1 folder/020172.txt
jared
(jared)
May 29, 2021, 4:02pm
7
yes, that is exactly what i want to do. but your filtering doesn't work on my windows situation somehow..
C:\rclone 1.55.1>rclone ls --include *.MOV --include '*2017*' "C:\Users\Jared\Pictures\Camera Roll"
72233619 20150511_003800938_iOS.MOV
66636031 20150605_010251000_iOS.MOV
13793156 20150615_155808804_iOS.MOV
34189351 20150615_155928983_iOS.MOV
250104294 20150619_210718001_iOS.MOV
772079054 20150619_211621454_iOS.MOV
183742902 20150710_203727373_iOS.MOV
292361932 20150712_014236151_iOS.MOV
233990321 20150718_160957259_iOS.MOV
147444357 20150719_210247865_iOS.MOV
29488199 20150720_001725175_iOS.MOV
43439207 20150720_001808393_iOS.MOV
144517641 20150720_001909250_iOS.MOV
58281717 20150720_002911724_iOS.MOV
227547621 20150803_015106582_iOS.MOV
125484959 20150803_021110934_iOS.MOV
11482673 20150803_234923081_iOS.MOV
15837055 20160317_032627000_iOS.MOV
30344718 20170614_010415000_iOS.MOV
488334339 20170625_025324000_iOS.MOV
360155409 20170625_025917000_iOS.MOV
262249424 20170625_030226000_iOS.MOV
58048623 20170715_150848000_iOS.MOV
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:03pm
8
as i noted in my previous post
jared
(jared)
May 29, 2021, 4:04pm
9
it works when i kick out the .mov filter. why would these two filters clash?
C:\rclone 1.55.1>rclone ls --include="*2017*" "C:\Users\Jared\Pictures\Camera Roll"
6002798 20170407_005305000_iOS.mp4
961776 20170407_013443000_iOS.jpg
1452317 20170413_010211000_iOS.jpg
844012 20170417_195219000_iOS.jpg
1440219 20170420_142110000_iOS.jpg
54775 20170425_050754000_iOS.jpg
868760 20170427_032408000_iOS.jpg
125851 20170428_062254000_iOS.jpg
1831223 20170429_011102000_iOS.jpg
1734427 20170429_012700000_iOS.jpg
1381224 20170429_013418000_iOS.jpg
1293826 20170429_014024000_iOS.jpg
1797335 20170430_012732000_iOS.jpg
1543913 20170430_012800000_iOS.jpg
1906123 20170502_225437000_iOS.jpg
1350649 20170502_225534000_iOS.jpg
1420148 20170507_204121000_iOS.jpg
2443954 20170507_212244000_iOS.jpg
1095984 20170507_235632000_iOS.jpg
1300174 20170508_151603000_iOS.jpg
892523 20170508_195718000_iOS.jpg
1889389 20170510_184611000_iOS.jpg
2081862 20170510_195947000_iOS.jpg
1846472 20170510_215905000_iOS.jpg
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:08pm
10
if you include *.mov
, then any file that contains .mov
will be included.
we are not understanding what you want to do?
do you want to copy all .mov
files, excluding filenames that contain 2017
?
jared
(jared)
May 29, 2021, 4:08pm
11
i want to copy all .mov files that have 2017 in the file name. is double filtering a problem?
jared
(jared)
May 29, 2021, 4:13pm
13
worked like a charm
C:\rclone 1.55.1>rclone ls --include=*2017*.mov --ignore-case "C:\Users\Jared\Pictures\Camera Roll"
30344718 20170614_010415000_iOS.MOV
488334339 20170625_025324000_iOS.MOV
360155409 20170625_025917000_iOS.MOV
262249424 20170625_030226000_iOS.MOV
58048623 20170715_150848000_iOS.MOV
719700855 20170715_214826000_iOS.MOV
15687756 20170719_015703000_iOS.MOV
15902482 20170719_133520000_iOS.MOV
99740697 20170721_212612000_iOS.MOV
740679 20170728_024825000_iOS.mov
59850943 20170728_232048000_iOS.MOV
2261360240 20170729_151126000_iOS.MOV
21632180 20170729_161246000_iOS.MOV
1556381 20170730_003556000_iOS.mov
14731513 20170801_015259000_iOS.MOV
21312084 20170801_015327000_iOS.MOV
65940723 20170815_150036000_iOS.MOV
30149592 20170815_151312000_iOS.MOV
48227674 20170815_152946000_iOS.MOV
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:18pm
14
you can remove --ignore-case
if the file extention is MOV
, not .mov
based on your files, where the 2017 is always that the start of the file name, then i would use
--include="2017*.MOV"
,
as this might not be what you want, noticed the first file is included as it has 2017 in the middle of the filename
rclone ls .\source --include="*2017*.MOV"
0 20150614_201715000_iOS.MOV
0 20170614_010415000_iOS.MOV
1 Like
jared
(jared)
May 29, 2021, 4:38pm
15
as you can see on the list, there's both .MOV and. mov.
asdffdsa:
based on your files, where the 2017 is always that the start of the file name, then i would use
--include="2017*.MOV"
,
so help me get this straight.
--include="2017*.MOV"
is for always at the start,
--include="*2017.MOV"
is for at the end,
--include="*2017*.MOV"
is for anywhere?
yes, in this case 2017 anywhere was fine.
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:41pm
16
--include="2017.MOV" is for anywhere?
not correct, should be --include="*2017*.MOV"
1 Like
jared
(jared)
May 29, 2021, 4:42pm
17
lol. yes. formatting error on my part
asdffdsa
(jojothehumanmonkey)
May 29, 2021, 4:44pm
18
ok. i see that you re-edited your post.
anyhoo, we got it solved
system
(system)
Closed
June 1, 2021, 4:45pm
19
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.