hey friends..my pc is facing a problem of read-only attribute files and folders...
i accessed a pen drive and all the files and folders of that pen drive became read-only (which were not read-only)....
and after copying some of the folders from the pendrive...i am not able to delete them from my pc due to the read-only attribute...so which virus am i facing?? and what is the solution to that??? :(

Dani AI

Generated

Brief diagnosis and safe next steps for the “files/folders became read‑only after using a pen drive” problem reported by . Several things can cause this: USB autorun/shortcut malware that sets hidden/system/read‑only flags, file‑system corruption on the pen drive, NTFS permission/ownership retention when copying, or a hardware write‑protect switch on the stick. The Explorer “Read‑only” box on folders is also a known UI quirk and can be misleading; folders still can be deleted unless something is actively preventing it.

Suggested workflow (do these in order, on a known-clean system if possible):

  1. Make the drive letter visible but do not run any unknown files. Enable viewing of hidden and protected OS files in Explorer to reveal autorun.inf or suspicious .lnk files.
  2. Repair attributes and the filesystem from an elevated command prompt on the correct drive letter (example shown for drive E: — confirm the drive letter before running anything):
E:
attrib -s -h -r *.* /S /D
chkdsk E: /f
  1. If files still cannot be deleted due to permissions, reset ownership and ACLs (Vista/7/Server/10+):
takeown /F "E:\path" /R /D Y
icacls "E:\path" /grant %USERNAME%:F /T
  1. For stubborn deletions (after backups): force delete and remove folder tree:
del /f /s /q "E:\folder\*.*"
rmdir /s /q "E:\folder"

Finally, run up‑to‑date anti‑malware scans (Malwarebytes or a reputable AV) on both the pen drive and the PC, disable autorun, and copy important files to a clean machine before making major fixes. was right that command‑line tools help; however, reformatting should be the last resort after data backup and malware checks.

try to delete or open that or why don't try to delete it via command prompt.... or worst why don't you reformat that

try to delete or open that or why don't try to delete it via command prompt.... or worst why don't you reformat that

well...actualy i want that data on my pc...
so i copied it...and after using it i want to delete it...
thats where i am facing the prob...
i cant delete it..coz its read-only..
even if i change the attribute...it reverts to read-only..
i think the virus (or whatever) was on my pc itself.. :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.