Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 '14 at 8:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .