CODE: [Copy to clipboard]@echo off for %%a in ("C:\test\*.*") do ( if "%%~xa" neq ".exe" ( echo attrib +h "%%a" ) )