0

I'm trying to delete a file Android will not let me delete it. Trying to use Termux, I can't seem to find the file. I used termux-setup-storage, and per the instructions entered:

cd /storage/sdcard0/FilesAndFolders

And get

bash: cd: /storage/sdcard0/FilesAndFolders: No such file or directory

I'm working with Android 11, and I am a real novice at this. I can't figure out what file path they want. Suggestions?

Even though I'm using:

rm -rf [directory name]

it still comes back saying the Directory is not empty. No command I try deletes this file. The file name at the end of the string has a black diamond with a question mark on it.

I tried SD Maid to no avail, Termux didn't work. I'm considering a factory reset as my only option. The file is a .mp4. I tried *.MP4, but no luck. I've tried deleting the folder and the file in every way I could find. I traced the file from the tree, sometimes it tells me the file doesn't exist when I can see it in the tree.

Is there any way to delete this file?

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Jimmy B
  • 11
  • 1
  • 3
  • 1
    Try cd storage followed by ls to show you the contents. Probably your folder is in shared ; do cd shared and ls again to see if you can find the folder. //With a normal file explorer can you tell the path where is it stored? – beeshyams Aug 13 '23 at 14:18
  • 1
    Looks like you look at your phone via USB/MTP. The paths you can see there are virtual, they do not exist in file-system. – Robert Aug 13 '23 at 14:26
  • Maybe there is a nomedia file in that folder. Try deleting it using file explorer and then try to delete the folder rm - rf – beeshyams Aug 13 '23 at 19:46
  • See this https://android.stackexchange.com/a/205247/131553 – beeshyams Aug 13 '23 at 19:49
  • "The file name at the end of the string has a black diamond with a question mark on it." seems to indicate that the file/SD card is corrupted. Perhaps the following Q&A might help: How to delete a corrupted file on SD Card – Andrew T. Aug 14 '23 at 14:05

1 Answers1

0

I think the path is incorrect.

  • Try one folder at a time from the top and see when it fails.
  • Or install a file explorer app to look at what's there. I use X-plore.

I am not associated with it.

jlehenbauer
  • 10,007
  • 6
  • 44
  • 68
Rohit Gupta
  • 1,795
  • 2
  • 14
  • 24