Page 1 of 1

Handling of bad sectors

Posted: 11 Aug 2026 14:55
by Kob
Right now, when I try to get into a directory with bad sectors, the program hangs for a few minutes. Every operation on files there (even just a file selection) hangs XYPlorer for some additional minutes. Trying to get out of that directory is almost impossible (more than 10 minutes, needing to kill the XYPlorer process).
Windows File Explorer also hangs in there, but only for a relatively short duration and let me get in and out of the bad directory much faster (in 20-30 seconds or so).

It would be nice to have a feature in XYPlorer that would let the user avoid the lengthy time priod trying to get into a directory with bad sectors or touch a file in there, with an adjustable lockout period. A popup message that an I/O error has been encountered would be great.

As a reference, there are disk management programs (e.g. DiskGenius) that allow me to set a timeout on bad sector reading, and contrary to CHKDSK, I can set in the DiskGenius program the time limit to a reasonable 200 mS lockout and check the sectors for "badness" really fast.

(Tested with XYPlorer 28.30.1700 on Win Server 2012R2)

Re: Handling of bad sectors

Posted: 11 Aug 2026 17:10
by Horst
A file manager is not designed to handle bad sectors.
It uses Windows API's to read from disk.
Fix the file system and/or replace the hardware is the final solution.

Re: Handling of bad sectors

Posted: 11 Aug 2026 19:51
by Kob
When suddenly there is a bad sector in a directory, XYPlorer hangs or crashes if you try to get into that directory.
You can not use XYPlorer to retrieve any good file from there.

On the other hand, Windows' File Explorer (Windows native file manager) does let you enter and retrieve good files.
Also, FastCopy has no problem listing the directory content and copy all the good files from that directory.

Re: Handling of bad sectors

Posted: 11 Aug 2026 23:47
by eil
If Don could find some delicate way to catch such situations and provide "Warning+Ignore" behavior, it actually could be useful. I had similar situations as topic starter and XY definitely handles "dirs with bads" worse than other file managers - even Explorer handles them better, though i usually used TotalCommander in such situations.
Surely, the "bads" aren't a work-field of XY, but at least not hanging on them would be good. I'd presume, hanging happens due to lots of info retrieved when dir is opened in XY, and other managers do less(obviously cause less features on board), so those hang only if user tries to do smth exactly with "bad" items and work fine when it's about others.

Re: Handling of bad sectors

Posted: 12 Aug 2026 14:37
by rpnfan
Horst wrote: ↑11 Aug 2026 17:10 A file manager is not designed to handle bad sectors.
It uses Windows API's to read from disk.
Fix the file system and/or replace the hardware is the final solution.
A file manager should be designed to handle "bad" situations gracefully, that includes bad sectors, network drives not be available, displaying information and giving options to the user _if_ something does not go nicely. Exactly that is one differentiating feature of a great file manager. I used Salamander for many years and it handled different situations better than the Explorer. XY handles these mostly similar, sometimes even worse.

I still use XY for other reasons, but hope the program will become more robust in the future.

Re: Handling of bad sectors

Posted: 12 Aug 2026 14:43
by highend
A file handler should handle files, not underlying hardware errors.
Map bad sectors out or if that isn't possible anymore, replace the drive^^

Re: Handling of bad sectors

Posted: 12 Aug 2026 15:15
by Kob
highend wrote: ↑12 Aug 2026 14:43 A file handler should handle files, not underlying hardware errors.
Map bad sectors out or if that isn't possible anymore, replace the drive^^
Some years ago, XYplorer got stuck on a startup if an assigned netwok drive had been off. The community response was not "this is a network issue - fix your network first". Don fixed the hanging issue in a subsequest update. Disk issues should be handled the same - via a watchdog timer or whatever, but leading the user to reboot because the XYplorer program sometimes is hung for minutes after attempting to kill the process is no fun.

Re: Handling of bad sectors

Posted: 12 Aug 2026 18:56
by Native2904
2Kob

Just a quick question – if you get that error on a shared hard drive, why don’t you run ‘chkdsk C: /R’ in the console and sort out the problem for the future, it's faster as waiting any time.

Re: Handling of bad sectors

Posted: 13 Aug 2026 01:35
by Kob
Native2904 wrote: ↑12 Aug 2026 18:56 2Kob

Just a quick question – if you get that error on a shared hard drive, why don’t you run ‘chkdsk C: /R’ in the console and sort out the problem for the future, it's faster as waiting any time.
I did run CHKDSK (actually with the /B switch, which is a superset of /R), but neither it nor other disk utilities, although they found the bad secor, could mark it to let the OS bypass it. The only viable solution was to remove all good files from that volume and do slow format to map out the bad sectors.