Workaround for folder hidden properties cannot be modified

  
Symptom:
After the U disk is used on the poisoned computer, the folders inside are gone. This is because the folder properties inside are changed to hidden attributes. By viewing the hidden folder found, the hidden properties of all hidden folders are locked and cannot be changed by right-clicking on the folder properties.

Reason:
This is because the hidden attribute is locked by default after the system attribute is added to the folder.
Solution:
After ensuring that the virus has been killed, you can use the following method to restore the folder properties.
Method 1: Manually use the attrib command to modify
1, start menu--select “ run ”--Enter“cmd”
2. Enter the command in the dos state: attrib c:"windows" -s -h (take the windows folder under c drive as an example, here c:"windows" Change to the path of the folder you want to change.
3. Run this command to remove the hidden attribute of the folder.
But we may find that all the folders are hidden, so one by one, the trouble is big.
The above method is suitable for modifying a single folder. The simple modification method of batch is to use wildcard * matching folder, the format is as follows:
1, assuming all the root folders under the c disk are hidden
attrib c:"*" -s -h /s /d
You can remove the hidden folder attribute of the c drive.
2. Suppose the d drive assumes that all the root folders under the c drive are Hidden
attrib d:"*" -s -h /s /d
Others and so on
Method 2: Use a simple batch method
Create a new text document file, Then copy the code into it, select “ Save As & rdquo;, the file name is set to “.bat” suffix format (ie change the .txt suffix to .bat). Then drag the folder you want to modify to the file and follow the prompts.
If you are infected with the U disk root directory, drag the U disk drive letter directly, select 2 all the way and press Enter.
@echo off&setlocal enableextensions enabledelayedexpansion
title Resolve issues that cannot be modified by folder hiding attributes
if "%~1"=="" (echo you didn't drag into any disk or File or folder!
echo ------
echo Please drag the disk or file or folder to be processed onto the batch file icon
echo instead of double-clicking to start the batch!& ;pause&goto :eof)
call:choose "Set hidden file properties, please select: " Do not change the settings
(set h=)&(if !c! equ 2 set h=- )&(if !c! equ 3 set h=+)
call:choose "Set system file properties, please select: " Do not change the settings
(set s=)&(if ! c! equ 2 set s=-)&(if !c! equ 3 set s=+)
call:choose "Set the application scope, please select: " file or folder own property and first level Directory Content Properties Folder First Level Directory Content Properties
for %%i in (%*) do (if !c! equ 1 call:attrib "%%~i"
for /f "delims =" %%j in ("dir /a /b "%%~i"") do call :attrib "%%~i%%~j")
pause&goto :eof
:choose
(set c=)&(set n=)&for %%i in ( %*) do echo !n! %%~i&set /a n+=1
(set /pc=)&(set /ac=c)&if !c! geq 0 if !c! leq !n! echo.&goto :eof
goto choose
:attrib
setlocal&(set a=)&(set a=%~a1)&if "!a!" =="" goto :eof
if not defined h if "!a:~3,1!"=="h" (set h=+) else (set h=-)
if not defined s if "!a:~4,1!"=="s" (set s=+) else (set s=-)
echo is processing: %~1&attrib ! h!h !s!s "%~1"&goto :eof
echo Modified successfully!

Copyright © Windows knowledge All Rights Reserved