GCFA · Question #272
You want to change the attribute of a file named ACE.TXT to Hidden. Which command line will enable you to set the attribute?
The correct answer is C. ATTRIB ACE.TXT +H. The Windows ATTRIB command uses a plus sign (+) to set an attribute and H to designate the hidden attribute, making +H the correct syntax to hide a file.
Question
You want to change the attribute of a file named ACE.TXT to Hidden. Which command line will enable you to set the attribute?
Options
- AATTRIB ACE.TXT -H
- BATTRIB ACE.TXT /HR
- CATTRIB ACE.TXT +H
- DATTRIB ACE.TXT /H
How the community answered
(45 responses)- A7% (3)
- B2% (1)
- C78% (35)
- D13% (6)
Why each option
The Windows ATTRIB command uses a plus sign (+) to set an attribute and H to designate the hidden attribute, making +H the correct syntax to hide a file.
ATTRIB ACE.TXT -H uses the minus sign operator which removes the hidden attribute from the file rather than setting it.
ATTRIB ACE.TXT /HR is not a valid ATTRIB syntax - the command does not use forward-slash flags or the R suffix for the hidden attribute.
ATTRIB ACE.TXT +H follows the correct Windows ATTRIB syntax where + adds the specified attribute and H targets the hidden attribute flag, resulting in ACE.TXT being marked as hidden.
ATTRIB ACE.TXT /H is not valid ATTRIB syntax - attributes are toggled with + or - prefixes, not forward-slash flag notation.
Concept tested: Windows ATTRIB command syntax for setting file attributes
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/attrib
Topics
Community Discussion
No community discussion yet for this question.