Wednesday, April 9, 2014
How to set the folder with hidden attribute to unhidden attribute?
The attrib command can change those, and I've got an easy way and a slightly longer way to do this. The first method is great if you have lots of files to work on. (The second method was written before I thought about using a batch file to automate the process.)Method 1: Batch file automation
1. Make a text file in Notepad and call it Unhide.txt.
2. Put the following line of text in the text file and save it:
attrib -h -s %1
3. Close Notepad and rename the text file to Unhide.bat so that it will be treated as a batch script file. (Note that you'll need have extentions for known file types showing, so if they're not a trip to Folder Options is in order.)
4. Drag and drop the files you need to adjust onto the batch file one at a time.
Method 2: Doing it manually
1. Go to Start|Run and type:
cmd
in the run box. Click OK.
2. type the following in the command prompt:
attrib -h -s
Make sure you add a space after the -s.
3. Drag and drop the file you want to change onto the command prompt window.
4. Press enter.
5. Repeat 2-4 for each file.
The same program (attrib) can be used to set/clear all the attributes. Use
attrib /?
if you want to see what all it can do.
Notes:
By using the '/s' parameter will do it for matching files for exampleDisplays or changes file attributes. ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename] [/S [/D]] + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. [drive:][path][filename] Specifies a file or files for attrib to process. /S Processes matching files in the current folder and all subfolders. /D Processes folders as well.
That will remove the read, hidden, system and archive attributes from ALL files ending with '.txt'.attrib -rhsa *.txt /s
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment