search
HomeSystem TutorialWindows SeriesHow to use attrib command
How to use attrib commandApr 18, 2024 pm 05:45 PM

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]

How to use attrib command

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:

##-AClear archive attributes SSet system properties-SClear system properties HSet hidden attributes-HClear hidden attributes ISet index properties-IClear index properties OSet offline attributes-OClear offline attributes XSet temporary Properties-XClear temporary properties
Options Description
R Set read-only attribute
-R Clear read-only attributes
A Set archive attributes
##Usage:

    Display file properties:
  1. <code>attrib 文件名</code>
  2. For example:
<code>attrib test.txt</code>

    Set file properties:
  1. <code>attrib [+|-] 选项 [文件名]</code>
  2. For example:
<code>attrib +R test.txt</code>

This will set the read-only attribute of the test.txt file.

    Clear file attributes:
  1. <code>attrib - 选项 [文件名]</code>
  2. For 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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Acer PD163Q Dual Portable Monitor Review: I Really Wanted to Love ThisAcer PD163Q Dual Portable Monitor Review: I Really Wanted to Love ThisMar 18, 2025 am 03:04 AM

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

Top 3 Windows 11 Gaming Features That Outshine Windows 10Top 3 Windows 11 Gaming Features That Outshine Windows 10Mar 16, 2025 am 12:17 AM

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

win11 activation key permanent 2024win11 activation key permanent 2024Mar 18, 2025 pm 05:56 PM

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

Why I Use Listary to Vastly Improve Windows SearchWhy I Use Listary to Vastly Improve Windows SearchMar 05, 2025 am 03:01 AM

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

Mozilla Thunderbird 136 Is Here, Switching to Monthly Updates by DefaultMozilla Thunderbird 136 Is Here, Switching to Monthly Updates by DefaultMar 07, 2025 am 01:19 AM

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

win11 activation key permanent 2025win11 activation key permanent 2025Mar 18, 2025 pm 05:57 PM

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

How to Create a Dynamic Table of Contents in ExcelHow to Create a Dynamic Table of Contents in ExcelMar 24, 2025 am 08:01 AM

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

This Wild Ultra-Wide Alienware Monitor is $300 Off TodayThis Wild Ultra-Wide Alienware Monitor is $300 Off TodayMar 13, 2025 pm 12:21 PM

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

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft