How to use attrib command
The Attrib command is used to operate the attributes of a file or directory, including setting or clearing read-only, archive, system, hidden, indexed, offline, and temporary attributes. Usage is as follows: display file attributes: attrib file name set file attributes: attrib [ |-] option [file name] clear file attributes: attrib - option [file name]
Attrib command usage
The Attrib command is used to display or change the attributes of a file or directory.
Syntax:
<code>attrib [+R|-R] [+A|-A] [+S|-S] [+H|-H] [+I|-I] [+O|-O] [+X|-X] [文件名]</code>
Options:
Options | Description |
---|---|
R | Set read-only attribute |
-R | Clear read-only attributes |
A | Set archive attributes |
Clear archive attributes | |
Set system properties | |
Clear system properties | |
Set hidden attributes | |
Clear hidden attributes | |
Set index properties | |
Clear index properties | |
Set offline attributes | |
Clear offline attributes | |
Set temporary Properties | |
Clear temporary properties |
- Display file properties:
-
<code>attrib 文件名</code>
Copy after loginFor example:
<code>attrib test.txt</code>
- Set file properties:
-
<code>attrib [+|-] 选项 [文件名]</code>
Copy after loginFor example:
<code>attrib +R test.txt</code>
This will set the read-only attribute of the test.txt file.
- Clear file attributes:
-
<code>attrib - 选项 [文件名]</code>
Copy after loginFor example:
<code>attrib -R test.txt</code>
This will clear the read-only attribute of the test.txt file.
Note:You must run Command Prompt as an administrator to change file attributes.
- Some properties are not available for certain file types.
- Be careful when using the attrib command as incorrect settings may result in inaccessible files or loss of data.
The above is the detailed content of How to use attrib command. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The Acer PD163Q Dual Portable Monitor: A Connectivity Nightmare I had high hopes for the Acer PD163Q. The concept of dual portable displays, conveniently connecting via a single cable, was incredibly appealing. Unfortunately, this alluring idea quic

Upgrade to Windows 11: Enhance Your PC Gaming Experience Windows 11 offers exciting new gaming features that significantly improve your PC gaming experience. This upgrade is worth considering for any PC gamer moving from Windows 10. Auto HDR: Eleva

Firefox 136 and Thunderbird 136: Enhanced Security and Performance The latest releases of Firefox and Thunderbird bring significant improvements in video playback smoothness, browsing security, and overall user experience. Let's delve into the key u

Listary: Supercharge Your Windows Workflow Listary is a powerful tool that significantly enhances Windows productivity by offering lightning-fast file searching, versatile system control, and seamless cross-application integration. Its intuitive des

A table of contents is a total game-changer when working with large files – it keeps everything organized and easy to navigate. Unfortunately, unlike Word, Microsoft Excel doesn’t have a simple “Table of Contents” button that adds t

Article discusses reliable sources for permanent Windows 11 activation keys in 2024, legal implications of third-party keys, and risks of using unofficial keys.

Article discusses sources for a permanent Windows 11 key valid until 2025, legal issues, and risks of using unofficial keys. Advises caution and legality.

Alienware AW3225QF: The best curved 4K display, is it worth buying? The Alienware AW3225QF is known as the best curved 4K display, and its powerful performance is unquestionable. The fast response time, stunning HDR effects and unlimited contrast, coupled with excellent color performance, are the advantages of this monitor. Although it is mainly aimed at gamers, if you can accept the shortcomings of OLED, it is also suitable for office workers who pursue high efficiency. Widescreen monitors are not only loved by gamers, but also favored by users who value productivity improvement. They are great for work and enhance anyone’s desktop experience. This Alienware monitor is usually expensive, but is currently enjoying it
