Answer the question
In order to leave comments, you need to log in
Checking file availability in BAT?
It is necessary to check with BAT whether the file is available for assigning the read-only attribute.
I tried using errorlevel (&& including) to check the execution, but alas, changing access rights does not write an error to errorlevel even if the attribute could not be assigned.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
@echo off
attrib +R test1.txt |>Nul FindStr /i "ЌҐв ¤®бвгЇ :" && echo "File is denied!"
Looks like he won.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question