Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just got a real scare, all my image files spread across several hard disks suddenly disappeared. Fortunately, I discovered that they had all somehow been set to hidden. I don't really want to leave all hidden files showing so is there any way I can globally remove the hidden attribute, ideally for all images files though I would settle for one image type at at time.

I'm happy enough to do this at command prompt - running Windows 8.1 - but not knowledgeable enough to actually write a script from scratch :)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can use attrib command to change the attribute of files and folders.

Displays 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.

Open Command Prompt navigate to the directory where all the images are using cd command.
Then type following command:

C:\My Pictures\> attrib -H *.jpg /S  

The above command will remove hidden attribute from all files ending with .jpg in that folder.

share|improve this answer
    
I've marked this answer as right because it gave what I originally asked for. I've discovered since, though, that the problem was that a number of folders including My Pictures had got marked as hidden and the attribute were applied to subfolders and files; simply reversing that process got rid of the problem. –  mharran May 5 at 8:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.