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.

I have a hidden file in my desktop that I recently switch to attrib +h in command prompt but don't know the name of the file. So I want to use the command prompt and change all files within the desktop to attrib -h. is it possible to do this to all files at the same time?

share|improve this question

migrated from stackoverflow.com Oct 20 '11 at 23:40

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

You didn't specify which OS you're using, but good guesses would be DOS, or any Windows system using the command prompt. (Linux has a sort of similar command, but it operates on different attributes, and linux hides files in a different manner anyways) (Ah, 'desktop' ... so Windows using command prompt...)

you could just type 'attrib *.*' and it'll display the attributes of ALL the files in the subdirectory, look for the one with H...

attrib *.*

You'd probably want to pipe the output through 'more' to see it page by page:

attrib *.* | more

OR

dir /a

and its paged version:

dir /a /p

which shows ALL the files in a subdir, hidden, system, read-only and archive... shows them all, regardless of the attribute flags. Look for the one you don't see with a typical 'dir' command

Once you find the naughty file, then use the attrib -h command to reset the hidden flag:

attrib -h myfile.xls

But if you're dead set on touching all the files, then

attrib -h *.*

would remove the hidden attribute on all files in the subdirectory. Not recommended since it could unhide files you shouldn't be playing with.

share|improve this answer
    
thanks for the help I appreciate it, now let me get back to that file... –  mendez Oct 21 '11 at 8:43
    
I'm sorry I forgot to mention my OS which is windows vista. I ran the command prompt as an administer and when I tried the attrib -h . command it displayed a list of all the files but it says access denied. Another question if I may. How can I just focus on revealing all of the files in the desktop? –  mendez Oct 21 '11 at 9:24
    
Folder Display Options or View options or such, enable 'show hidden files', pretty simple. There's also 'show system files', but I'd recommend NOT touching that one, actually, don't mess with hidden files (and most certainly NOT system files) on windows boxes at all unless you REALLY know what you're doing... unless you're REALLY good at reinstalling windows. Search SO/SU for 'Show hidden files in windows' for a longer answer. –  lornix Oct 21 '11 at 11:15

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.