11110
(cgking)
July 18, 2020, 7:51am
1
What is the problem you are having with rclone?
i want just copy or move files,not folder,but i don't konw use which the flag
What is your rclone version (output from rclone version
)
1.52.2
Which OS you are using and how many bits (eg Windows 7, 64 bit)
debian10
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 copy/move
The rclone config contents with secrets removed.
Paste config here
A log from the command with the -vv
flag
Paste log here
For a file:
textere@seraphim ~ % rclone copy /etc/hosts GD: -vv
2020/07/18 07:19:07 DEBUG : rclone: Version "v1.52.0" starting with parameters ["rclone" "copy" "/etc/hosts" "GD:" "-vv"]
2020/07/18 07:19:07 DEBUG : Using config file from "/Users/textere/Documents/rclone.conf"
2020/07/18 07:19:07 DEBUG : fs cache: renaming cache item "/etc/hosts" to be canonical "/etc"
2020/07/18 07:19:07 DEBUG : GD: Loaded invalid token from config file - ignoring
2020/07/18 07:19:08 DEBUG : GD: Saved new token in config file
2020/07/18 07:19:08 DEBUG : hosts: Need to transfer - File not found at Destination
2020/07/18 07:19:09 DEBUG : hosts: MD5 = a3f51a033f988bc3c16d343ac53bb25f OK
2020/07/18 07:19:09 INFO : hosts: Copied (new)
2020/07/18 07:19:09 INFO :
Transferred: 213 / 213 Bytes, 100%, 171 Bytes/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 1.2s
2020/07/18 07:19:09 DEBUG : 8 go routines active
11110
(cgking)
July 18, 2020, 11:27am
4
may be i'm not talk clear enough,i mean's:
NOW google drvie AAA team disk:
A/aa/aaa.txt
B/bbb.mp4
C/cc/ccc/ccc.exe
i want move to BBB disk from AAA disk,like this:
BBB----aaa.txt
|--bbb.mp4
|--ccc.exe
rclone copy AAA:aa/aaa.txt BBB:
rclone copy AAA:B/bbb.mp4 BBB:
rclone copy AAA:C/cc/ccc/ccc.exe BBB:
are some examples.
11110
(cgking)
July 18, 2020, 11:57am
6
Is there a tag like --file-only,can be like this:
rclone copy cg:{A} cg:{B} --file-only
or may be Through the filter method, only copy *.mp4 files, not including its parent folder
I think you are asking if rclone flattens directories? If that is the question, the answer is that it does not.
11110
(cgking)
July 18, 2020, 12:04pm
8
Is the filter method also not working? I only need *.mp4 files
Can you share an example of what you are trying to do and what isn't working with a filter as an example would be:
felix@gemini:~$ rclone ls GD: --include *.mkv --max-depth 1
1504953150 jellyfish-400-mbps-4k-uhd-hevc-10bit.mkv
11110
(cgking)
July 18, 2020, 12:15pm
10
$ rclone ls cgking:{A目录} --include *.mp4 --max-depth 2
zsh: no matches found: *.mp4
You need to put some quotes around those characters as that's a shell item.
rclone ls cgking:'{A目录}' --include *.mp4 --max-depth 2
11110
(cgking)
July 18, 2020, 12:20pm
12
rclone ls cgking:'{xxx}' --include *.mp4 --max-depth 2
zsh: no matches found: *.mp4
You aren't typing something correct or pasting it in right as you still have a shell / terminal issue:
felix@gemini:~$ rclone ls GD:'{A目录}' --include *.mp4 --max-depth 2
2020/07/18 08:20:35 ERROR : : error listing: directory not found
2020/07/18 08:20:35 Failed to ls with 2 errors: last error was: directory not found
11110
(cgking)
July 18, 2020, 12:22pm
14
rclone tree
/
├── FC2-PPV-1156621
│ ├── FC2-PPV-1156621_1.mp4
│ ├── FC2-PPV-1156621_2.mp4
│ ├── FC2-PPV-1156621_3.mp4
│ └── FC2-PPV-1156621_4.mp4
├── FC2-PPV-1279576
│ ├── FC2-PPV-1279576.mp4
│ └── FC2-PPV-1279576.mp4(副本)
That means it is not executing rclone at all and the shell is interpreting your command as you need quotes around a special character.
You are using zsh shell so you need to escape the * as well.
rclone ls GD:'{A目录}' --include '*.mp4' --max-depth 2
11110
(cgking)
July 18, 2020, 12:26pm
16
195997693 FC2PPV-1173583/FC2PPV-1173583-2.mp4
131474205 FC2PPV-1173583/FC2PPV-1173583-3.mp4
4798765069 FC2PPV-1205683/FC2PPV-1205683-1-.mp4
924175761 FC2PPV-1205683/FC2PPV-1205683-2.mp4
55272407 FC2PPV-1205683/uuv79.mp4
716975934 FC2PPV-1208393/FC2PPV-1208393.mp4
234183958 FC2-PPV-1279576/FC2-PPV-1279576.mp4
1272505113 FC2PPV-1113938/FC2PPV-1113938.mp4
In general, if you don't see rclone execute, it's usually a local item and not related to rclone as it's a shell item.
11110
(cgking)
July 20, 2020, 3:56am
18
I thought of a good way:
"rclone lsjson --files-only
name=cat lsjaon.json | grep
fromid=cat lsjason.json | grep
for i in cat name ;do
rclone move $fromid toid; done"
Now I have 2 questions:
How to export the result of rclone lsjson to a file;
How to write the regular expression for extracting file name and id from rclone lsjson?
can you help me?
This script should solve the problem of folder expansion and can be used by many people
I'd probably just use lsf:
felix@gemini:~$ rclone lsf GD: --max-depth 1 --files-only
hosts
hosts.txt
jellyfish-400-mbps-4k-uhd-hevc-10bit.mkv
and you could
felix@gemini:~$ rclone lsf GD: --max-depth 1 --files-only >> blah
felix@gemini:~$ cat blah
hosts
hosts.txt
jellyfish-400-mbps-4k-uhd-hevc-10bit.mkv
I don't use the json output so I'm not familiar with it.
You'd have to research a bit as I'm not sure offhand as it requires some testing and validation. I'm sure you can spend some time and figure it out.