delete failure

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
rnmerchant
Member
Member
Posts: 20
Joined: 2020 Nov 23, 01:20

delete failure

Post by rnmerchant »

I've had a interesting issue trying to delete files. This is from a 250gb SD card that I want to use in an android music player.

I rather think that it is not an Xplorer2 problem but something with file systems but I thought I'd ask here...

There's something funny with the file system. So I figure I'll just re-load the card by deleting all the files in the "Albums" folder. I select all files and do an attempted robust delete. I get log errors (image attached).

If a directory/subdirectory shows up in the file manager why can it not be deleted? I think it is corrupted because it came via the android system - ? not following proper rules to write the directory - as I did produce the SD card on my Windows system and at the end of that the file system read correctly.

I've performed a 'destructive delete' by reformatting the card but it is perplexing me.

Thanks

Image
dunno
Gold Member
Gold Member
Posts: 506
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: delete failure

Post by dunno »

Sometimes a locked directory/file can be deleted via the command line. It could also be that you don't have read/write permission for that file, check and reset/modify the permissions/user of the directory/file.

Did you try a different PC or OS ?.

Edit:
There are some small applications which can unlock these types of files, but be wary of installing untrusted free applications.
@ Nikos, there's a nice little feature to implement, a way of unlocking these pesky undeletable directories/folders/files, or include additional dialogue to the "unable to delete" menu which point the user to check the permissions of the file.

*returns to hammock*
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: delete failure

Post by nikos »

you didn't attach any logs! but they probably wouldn't be much use...
here's a powertoy that helps unlocking https://learn.microsoft.com/en-us/windo ... -locksmith
rnmerchant
Member
Member
Posts: 20
Joined: 2020 Nov 23, 01:20

Re: delete failure

Post by rnmerchant »

I tried to attach an image but I guess that didn't work.

Anyway it is part of something funny going on. I'm not techy enough to understand.

I was trying to copy music files to an SD card. This was about 13,000 files in 380 subdirectories, total of 230gb. But a simple operation, really: mirror the subdirectory to a similar subdirectory on the SD card.

But there is corruption. The screenshot I showed said, amongst other things, "error: can't read from folder ..." relating to an odd directory about 30 laryers deep (something like this: I:\Albums\Diana Krall\data\data\data\data\... and then a whole bunch of [Windows error = 145: The directory is not empty] This set of 'data' subdirectories is something I didn't make - some sort of a recursive loop must have produced them; presumably eventually a corrupted directory header meant it couldn't be deleted, then all the subsequent ones couldn't be deleted.

Reformatting and re-copying the files has not solved the issue: I have new similar errors. Interestingly I have also run chkdsk and Windows reports a whole bunch of errors - crosslinks on allocation units - and 'resolves them by copying'... And then reports that Windows has fixed things. Then repeating the chkdsk it gives a whole bunch of new errors...

Maybe it's a bad SD card - that would be sad as it's a brand new Samsung card - but stranger things have happened. But I bought the new card because I was having similar problems with another. Both having been placed in the android player so ? something odd withthe android file management system.

In any case I repeat that I don't think this is an Xplorer2 issue but a Windows one...

Also should note that I - admin - created and copied the files so no obvious reason there would be ownership issues though with Windows who knows.
dunno
Gold Member
Gold Member
Posts: 506
Joined: 2007 Nov 18, 03:00
Location: Tropical Hammock

Re: delete failure

Post by dunno »

Is the file system FAT32, if so is there any file which is larger than 4GB ?.
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: delete failure

Post by nikos »

it looks like a hardware fault, unless it happens with other SD cards too
Robert2
Gold Member
Gold Member
Posts: 671
Joined: 2004 Jun 17, 15:39

Re: delete failure

Post by Robert2 »

You could try running the following 2 command-lines with Administrative Powers:
DISM.exe /Online /Cleanup-image /Restorehealth
sfc /scannow
These system health tools can take some time to complete the task, especially the first one.
For details, have a look at How to use DISM command tool to repair Windows 10 image | Windows Central
HTH
User avatar
johngalt
Gold Member
Gold Member
Posts: 559
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock
Contact:

Re: delete failure

Post by johngalt »

One thing to realize is that the file system might be playing a factor here.

Windows only allows for a max path length (in characters) of 260.

https://learn.microsoft.com/en-us/windo ... ing-a-file
Maximum Path Length Limitation

In editions of Windows before Windows 10 version 1607, the maximum length for a path is MAX_PATH, which is defined as 260 characters. In later versions of Windows, changing a registry key or using the Group Policy tool is required to remove the limit. See Maximum Path Length Limitation for full details.
In Android, there is not necessarily a hard limit set.

https://stackoverflow.com/questions/174 ... in-android
Its not defined for Android as a whole- different devices use different filesystems. I wouldn't use a name over 255 characters (the limit of ext3, which some deices use), but I don't think there's a common length you could claim is the maximum across devices
I tested with 1024 characters long path and it works in every device I tested on. I didn't go further up, maybe it mess up the sd card.
If you were trying to do this on a Windows device, the errors could be simply because the path length is entirely too long for Windows to process.
Image

Image
rnmerchant
Member
Member
Posts: 20
Joined: 2020 Nov 23, 01:20

Re: delete failure

Post by rnmerchant »

My reply seems to have gotten lost (or perhaps I didn't press the submit).

This is the problem almost certainly. The directory lengths became much too long. I suspect (in the absence of a better explanation) that this was an issue with my android device doing something funny.

Unfortunately it seems to have been a problem on 2 different SD cards. Is it related to the fact that there are ~300 some directories and ~13,000 files? Android should be able to manage that.

In any case I'm going to retry some of the steps and see what evolves.

Thanks for the offers. Richard
Post Reply