Doing a checkdisk on one of my partition in Windows XP, it reports that there is 4KB in bad sectors.
How can I know if this bad sector belongs to a file/folder or not, and if yes which file/folder it is so I can avoid accessing it?
You can try using contain nfi.exe tool which is included in Win2K OEM support tools to identify the file that occupies a particular sector:
Nfi.exe also works on Win XP and 2003. More Info here. This is an example of output I've made on my W7 machine. Run this tool from CMD. If no switches are added - help will appear.
Use C:\nfi.exe C: >C:\output.txt to save results and search for specific sectors later. Good Luck!