Can't delete folder with invalid characters on Android 11 phone (Folder downloaded with RCX)

What is the problem you are having with rclone?

I can't delete folder/files with invalid characters in "recycle bin" folder on Android phone with Termux because of invalid encoding (correct encoding in that folder only shows with "Serve a remote" via FTP in RCX app with Windows-1251 encoding)

It's downloaded in RCX via "HTTP" remote from old FTP server (folders from 2007-2010 year) The folder i downloaded Albums with two folders inside and one containing russian characters that got encoded badly in RCX
And the ftp server is 'Apache/2.2.15 (FreeBSD) DAV/2 PHP/5.2.17 with Suhosin-Patch mod_ssl/2.2.15 OpenSSL/0.9.8x mod_perl/2.0.5 Perl/v5.10.1 Server at ftp.neiks.net.ru Port 80'

In all file managers that folder without FTP serving displays as 0 byte file and encoding in the beginning of filename messed up

But in RCX displaying it as directory:


however when i click it i see "Error retrieving directory content"

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

$ ls
'01 '$'\304\356\360\356\346\352\340'' 1.mp3'
'02 '$'\304\356\360\356\346\352\340'' 2.mp3'
'03 '$'\304\356\360\356\346\352\340'' 3.mp3'
'04 '$'\304\356\360\356\346\352\340'' 4.mp3'
'05 '$'\304\356\360\356\346\352\340'' 5.mp3'
'06 '$'\304\356\360\356\346\352\340'' 6.mp3'
'07 '$'\304\356\360\356\346\352\340'' 7.mp3'
'08 '$'\304\356\360\356\346\352\340'' 8.mp3'
'09 '$'\304\356\360\356\346\352\340'' 9.mp3'
'10 '$'\304\356\360\356\346\352\340'' 10.mp3'
'11 '$'\304\356\360\356\346\352\340'' 11.mp3'
'12 '$'\304\356\360\356\346\352\340'' 12.mp3'
'13 '$'\304\356\360\356\346\352\340'' 13.mp3'
$ rclone delete '01 '$'\304\356\360\356\346\352\340'' 1.mp3'
2022/02/19 00:45:26 NOTICE: Config file "/data/data/com.termux/files/home/.config/rclone/rclone.conf" not found - using defaults
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "01 \xc4\xee\xf0\xee\xe6\xea\xe0 1.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "02 \xc4\xee\xf0\xee\xe6\xea\xe0 2.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "03 \xc4\xee\xf0\xee\xe6\xea\xe0 3.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "04 \xc4\xee\xf0\xee\xe6\xea\xe0 4.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "05 \xc4\xee\xf0\xee\xe6\xea\xe0 5.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "06 \xc4\xee\xf0\xee\xe6\xea\xe0 6.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "07 \xc4\xee\xf0\xee\xe6\xea\xe0 7.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "08 \xc4\xee\xf0\xee\xe6\xea\xe0 8.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "09 \xc4\xee\xf0\xee\xe6\xea\xe0 9.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "10 \xc4\xee\xf0\xee\xe6\xea\xe0 10.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "11 \xc4\xee\xf0\xee\xe6\xea\xe0 11.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "12 \xc4\xee\xf0\xee\xe6\xea\xe0 12.mp3"
2022/02/19 00:45:26 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "13 \xc4\xee\xf0\xee\xe6\xea\xe0 13.mp3"
2022/02/19 00:45:26 ERROR : 01 ������� 1.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/01 ������� 1.mp3: no such file or directory
2022/02/19 00:45:26 ERROR : Attempt 1/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 00:45:26 ERROR : 01 ������� 1.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/01 ������� 1.mp3: no such file or directory
2022/02/19 00:45:26 ERROR : Attempt 2/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 00:45:26 ERROR : 01 ������� 1.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/01 ������� 1.mp3: no such file or directory
2022/02/19 00:45:26 ERROR : Attempt 3/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 00:45:26 Failed to delete with 2 errors: last error was: failed to delete 1 files

A log from the command with the -vv flag

Log with other file

$ rclone delete -vv '13 '$'\304\356\360\356\346\352\340'' 13.mp3'
2022/02/19 01:03:56 DEBUG : rclone: Version "1.57.0-termux" starting with parameters ["rclone" "delete" "-vv" "13 \xc4\xee\xf0\xee\xe6\xea\xe0 13.mp3"]
2022/02/19 01:03:56 DEBUG : Creating backend with remote "13 \xc4\xee\xf0\xee\xe6\xea\xe0 13.mp3"
2022/02/19 01:03:56 NOTICE: Config file "/data/data/com.termux/files/home/.config/rclone/rclone.conf" not found - using defaults
2022/02/19 01:03:56 DEBUG : fs cache: adding new entry for parent of "13 \xc4\xee\xf0\xee\xe6\xea\xe0 13.mp3", "/data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/\xd2\xf0\xe8 \xe3\xee\xe4\xe0 FlyGroup"
2022/02/19 01:03:56 DEBUG : Waiting for deletions to finish
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "01 \xc4\xee\xf0\xee\xe6\xea\xe0 1.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "02 \xc4\xee\xf0\xee\xe6\xea\xe0 2.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "03 \xc4\xee\xf0\xee\xe6\xea\xe0 3.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "04 \xc4\xee\xf0\xee\xe6\xea\xe0 4.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "05 \xc4\xee\xf0\xee\xe6\xea\xe0 5.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "06 \xc4\xee\xf0\xee\xe6\xea\xe0 6.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "07 \xc4\xee\xf0\xee\xe6\xea\xe0 7.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "08 \xc4\xee\xf0\xee\xe6\xea\xe0 8.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "09 \xc4\xee\xf0\xee\xe6\xea\xe0 9.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "10 \xc4\xee\xf0\xee\xe6\xea\xe0 10.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "11 \xc4\xee\xf0\xee\xe6\xea\xe0 11.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "12 \xc4\xee\xf0\xee\xe6\xea\xe0 12.mp3"
2022/02/19 01:03:56 NOTICE: Local file system at /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup: Replacing invalid UTF-8 characters in "13 \xc4\xee\xf0\xee\xe6\xea\xe0 13.mp3"
2022/02/19 01:03:56 DEBUG : 01 ������� 1.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 02 ������� 2.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 03 ������� 3.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 04 ������� 4.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 05 ������� 5.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 06 ������� 6.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 07 ������� 7.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 08 ������� 8.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 09 ������� 9.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 10 ������� 10.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 11 ������� 11.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 12 ������� 12.mp3: Excluded
2022/02/19 01:03:56 ERROR : 13 ������� 13.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/13 ������� 13.mp3: no such file or directory
2022/02/19 01:03:56 ERROR : Attempt 1/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 01:03:56 DEBUG : Waiting for deletions to finish
2022/02/19 01:03:56 DEBUG : 01 ������� 1.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 02 ������� 2.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 03 ������� 3.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 04 ������� 4.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 05 ������� 5.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 06 ������� 6.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 07 ������� 7.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 08 ������� 8.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 09 ������� 9.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 10 ������� 10.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 11 ������� 11.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 12 ������� 12.mp3: Excluded
2022/02/19 01:03:56 ERROR : 13 ������� 13.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/13 ������� 13.mp3: no such file or directory
2022/02/19 01:03:56 ERROR : Attempt 2/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 01:03:56 DEBUG : Waiting for deletions to finish
2022/02/19 01:03:56 DEBUG : 01 ������� 1.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 02 ������� 2.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 03 ������� 3.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 04 ������� 4.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 05 ������� 5.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 06 ������� 6.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 07 ������� 7.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 08 ������� 8.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 09 ������� 9.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 10 ������� 10.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 11 ������� 11.mp3: Excluded
2022/02/19 01:03:56 DEBUG : 12 ������� 12.mp3: Excluded
2022/02/19 01:03:56 ERROR : 13 ������� 13.mp3: Couldn't delete: remove /data/data/com.termux/files/home/storage/shared/.$recycle_bin$/dirs/.$recycle_bin$_1645229651127_0/��� ���� FlyGroup/13 ������� 13.mp3: no such file or directory
2022/02/19 01:03:56 ERROR : Attempt 3/3 failed with 2 errors and: failed to delete 1 files
2022/02/19 01:03:56 DEBUG : 2 go routines active
2022/02/19 01:03:56 Failed to delete with 2 errors: last error was: failed to delete 1 files

I can't delete a single file there and the folder size in FTP (RCX) in FX filemanager is "172 MB with 13 .mp3 files" and it throws errors when i try to delete folder


How can I get rid of that folder? Have tried delete and purge commands but it didn't help. And i won't reset my phone only because of that folder.

Rclone only works with utf-8 encoding and I'd guess these files are in some other encoding.

You can use the command line tool convmv to change the encoding. You could do this in the termux app.

If you just want to delete the directory then can't you do that with any Android file manager? Or did I misunderstand?

Ok, but i can't even delete that folder with rm -rf command because it gives "No such file or directory" on mp3 files. Unfortunately Termux doesn't have convmv package. I will try to connect phone with Kali on my laptop but i think it will don't help

Added use case to the existing feature request

1 Like

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