Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Command Prompt - Windows 11, 10, etc. ► ««« »»»

How to remove read-only or hidden file attribute via cmd?


To do this, open/start cmd.exe or start the ColorConsole .



You can change all file attributes using the Windows command prompt, which also makes sense for many files under Windows 11, 10, 8.1, and also under Microsoft's Web Server 2019, 2016, ....!

Contents:

1.) ... Change file attributes with the Windows command prompt!
2.) ... Further considerations for changing file attributes with Windows Command Prompt!




1.) Change file attributes with the Windows command prompt!


Preliminary description (meaning) of the attributes:

H = Hidden
S = System
R = Read-only
A = Archive



You can use the "ATTRIB" command to view and change file attributes.

# Show file attributes!
C:\Test>ATTRIB *.*
A   HR     C:\Test\5.txt
A HR C:\Test\Hidden File1.txt
A   HR     C:\Test\System Datei1.txt
 
C:\Test>
 

# Change or delete file attribute
 
"+" for setting an attribute.
"-" for deleting an attribute.
 
# The example here removes the read-only attribute for all files in the Test folder.
 
C:\Test>ATTRIB *.* -R /S
 
C:\Test>

# Show file attributes again!
C:\Test>ATTRIB *.*
A   H      C:\Test\5.txt
AHC:\Test\Hidden File1.txt
A   H      C:\Test\System Datei1.txt
 
C:\Test>
 

# ... Here is the help file for ATTRIB
C:\Test>ATTRIB /?
Displays or changes file attributes.
 
ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:][path][filename]
 [/S [/D]]
 
+ Sets an attribute.
- Deletes an attribute.
R attribute for 'read-only file'
A Attribute for 'File to archive'
S attribute for 'system file'
H attribute for 'hidden file'
 [Drive:][Path][Filename]
 

# Specifies files for the attribute process.
/S Processes matching files in the current folder
# and in all subfolders.
/D Also processes the folders.
C:\Test>
 


2.) Additional considerations for changing file attributes with Windows Command Prompt!




To unhide file status via CMD, you can use the following command:

attrib -h

Replace with the name of the file whose file status you want to clear.




attrib -h C:\Temp\hidden_file.txt

This command removes the hidden attribute from the file C:\Temp\hidden_file.txt. The file will now appear in File Explorer.

If you want to clear file status for multiple files, you can use the following command:

attrib -h *.txt

This command removes the "hidden" attribute from all files with the extension .txt.

To remove hidden file status from all files in a folder and its subfolders, you can use the following command:

attrib -h -r -s /s /d

Replace with the name of the folder whose files you want to make visible.




attrib -h -r -s /s /d C:\Temp

This command removes the hidden attribute for all files and folders in the C:\Temp folder and its subfolders.

Notes:

Unhiding a system file may cause problems.
When you remove a folder from hidden file status, all files and folders in that folder also become visible.

Other considerations for changing file attributes with Command Prompt:

- Hidden files: Hidden files will not appear in File Explorer unless you enable the Show hidden files, folders, and drives option. You can use hidden file status for a file or folder to protect it from unauthorized access.

- Read-only files: Read-only files cannot be edited or deleted. You can use read-only file status for a file to prevent it from being accidentally modified.

- System files: System files are necessary for the proper functioning of the operating system. You should not change the "System" file status for system files unless you know what you are doing.

- Archive files: Archive files are taken into account in data backups. You can use Archive file status for a file to ensure that it is backed up during the next backup.

Security:

Changing file attributes can pose a security risk. If you remove a file from read-only status, it may be accidentally modified or deleted. If you remove the hidden file status from a file, it can be seen by unauthorized people.

Precautions: When changing file attributes, you should take the following precautions:

- Before changing file attributes, back up files.
- Only change the file attributes you need to change.
- Test changes on a test file before making them on an important file.


Alternatives:
You can also change file attributes using File Explorer. Right-click the file or folder whose file attributes you want to change and select "Properties." Then click the "General" tab and change the file attributes you want.



FAQ 8: Updated on: 3 November 2023 19:34 Windows
Windows-Console

Close correctly, the command prompt e.g. cmd.exe!


ALT+F4 or close window button, is not the right solution to close the windows command prompt correctly Content: 1. Right way to close the command Prompt
Windows-Console

Taskkill with the Cmd.exe, how to use correct and useful with examples!


The taskkill can be used to end one or more processes in any windows OS. With TASKKILL, processes can be killed by the process id or image name. There are
Windows-Console

Make Windows command prompt wider, how to?


The solution is easy to make the Windows command prompt cmd window wider, to see more of the output text   Content: 1. The new example under Windows
Windows-Console

Long file and folder paths in the CMD prompt (insert,paste)!


If you enter long file or folder paths in the cmd.exe command prompt the solution is very simple to avoid typos errors 1. Solution 1: Using drag
Windows-Console

Start programs with different priority classes, how to do on Windows 10, 11?


You can start programs with a specific process priority via the MS Windows command prompt cmd.exe, with help from the START command Here are the solutions
Windows-Console

Wi-Fi or WLAN Show Driver Information, how to (Command Prompt)?


With NETSH, it is conceivable to display the Wi-Fi or WLAN driver information under Windows 11, 10, and MS Server OS 1. display WLAN driver information
Windows-Console

How to use CMD NET use HELP?


The solution is simple to use in CMD the NET HELP command, the solution is for Windows 11, 10, and Microsoft Windows Server OS   Content: 1. The

»»

  My question is not there in the FAQ
Asked questions on this answer:
  1. Hide Cmd name?
  2. Folder attributes hidden under Windows Server 2016 and 2012?
  3. Cmd del all attributes?
  4. Hidden Takeown attribute Windows 11?
  5. How to change hidden to readonly files?
  6. Cmd show hidden files?
  7. Remove read only attribute windows 11?
  8. Unhide hidden files server 2012 cmd?
  9. Cmd command to remove hidden attribute?
  10. View and change attributes drive c Windows 11?
  11. Remove read-only attribute file Windows 11?
  12. Hide folder commandline?
  13. How to remove read only file in c drive?
  14. Folder attribute hidden change MS DOS?
  15. Change read only attibute on program data file windows 7 cmd?
  16. Change attribute hidden cmd?
  17. Show cmd attributes on Windows 11, 10, Server 2016, and 2012?
  18. Hide cmd folder console command?
  19. Folder read only c:windows di win 8?
  20. How to remove file hidden and system properties using command prompt?
  21. How to remove readonly files from c drive?
  22. Win 10 file attributes remove, edit even under Windows Server 2016 and 2012?
  23. Remove the hidden, read only, and system attributes from command prompt windows 7?
  24. Change drive attributes?
  25. Hide folder Windows 11?
  26. Remove write protection via batch cmd line?
  27. How to remove read-only attribute using cmd?
  28. Console cmd file properties read-only windows?
  29. Change file attribute hidden cmd line?
  30. Change cmd attribute Windows 11?
  31. Windows 11, 10, 8.1 attribute hidden hidden?
  32. Change file attributes cmd Windows 11?
  33. Hidden files with cmd attribute change Windows?
Keywords: windows, 11, 10, server, eleven, command, prompt, remove, read, only, hidden, file, attribute, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + ClassicDesktopClock
  + PreventTurnOff
  + QuickMemoryTestOK
  + IsMyHdOK
  + AutoPowerOptionsOK
  + OneLoupe
  + TraceRouteOK
  + GetWindowText
  + AutoHideMouseCursor
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Move across the File Explorer Menus and change settings on Windows OS! ◄
► Quad Explorer with single window mode plus preview! ◄
► Disable Bitlocker, Windows-10? ◄
► Image from MS Explorer via keyboard shortcut as an image in the clipboard! ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....