@echo off&setlocal enableextensions enabledelayedexpansion
title resolves a problem batch that cannot be modified by the folder hidden property
If "%~1" = "" (Echo you did not drag into any disk or file or folder!)
echo------
echo please drag the disk or file or folder you want to process onto the batch file icon
echo instead of double-click Start Batch!&pause&goto:eof)
Call:choose "Set hidden file properties, select:" Do not change the Remove settings
(Set h=) & (if!c! equ 2 set h=-) & (if!c! equ 3 set h=+)
Call:choose "Set the System file properties, select:" Do not change the Remove settings
(Set s=) & (if!c! equ 2 set s=-) & (if!c! equ 3 set s=+)
Call:choose "Set Application scope, select:" File or folder itself 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/p c=) & (set/a c=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!
Computer poisoning u disk so the file is hidden and cannot be set as visible