@echo off
md folder1
attrib -s -h -r "folder1" /s /d
dir c:\windows>>text.txt
attrib -s -h - r text.txt
pause
Created by simple command md folder1 and in 3rd line I follow advice from
How to remove read-only attribute recursively on Windows 7
This should help to remove attributes [-h],[-s],[-r] with added additional parameters /s & /d to be sure that this will works for folders too.
Everything is working well with file and folders working only with switches [-h],[-s] but so far I can't find a way to remove/change [-r] read-only attribute for any folders or subfolders.
Is there any way to change attributes read-only in folders using batch script or cmd ?
(even if batch is started with admin rights this no change)
What is reason that switch read-only [-r] for empty created folders not working?
Is this Windows Enviroment protection not allow to change folder's [-r] attribute?