Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Is there a way to hide files of only one particular extension/type?

04 Apr 2012   #11
pxfragonard

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by writhziden View Post
Quote   Quote: Originally Posted by pxfragonard View Post
Thanks for a very elegant and simple solution. I take it s / d means subdirectory... very nice!
The /s means all files within the directory containing that extension will have the attribute applied. /d, as you guessed, means all directories and subdirectories will be checked for files with that extension. The directories themselves will not be hidden, but the files with that extension contained in the directories will have the hidden attribute applied or removed.
Thanks very much!


My System SpecsSystem Spec
.

04 Apr 2012   #12
pxfragonard

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by EzioAuditore View Post
Quote   Quote: Originally Posted by pxfragonard View Post
Quote   Quote: Originally Posted by writhziden View Post
Another option is to put the batch file in the top level directory. You could make two batch files, one with a +h called hide.bat and one with a -h called unhide.bat for instance. In the top level, create the hide.bat file with this command:
attrib /s /d +h *.dop
and the unhide.bat file with:
attrib /s /d -h *.dop
These will hide/unhide all files in the current directory and every subdirectory within that directory.
Thanks for a very elegant and simple solution. I take it s / d means subdirectory... very nice!
Here's what they mean:

/S Processes files in all directories in the specified path.
/D Process folders as well.

You can type attrib /? in a command window to know as what switches does it support and what they do.

If you just type /? you'll get a list of all the commands with their respective brief explanation...

You can do wonders (as i like to say) by mastering the commandline.. :P
Mastering the command line is way beyond me now but it's exciting to know you can make computers do any logical series of things because it's just a machine. I'm going to try to understand and work toward that goal.
My System SpecsSystem Spec
04 Apr 2012   #13
EzioAuditore

Winbdows 7 ultimate x64 | Ubuntu 12.04 x64 LTS
 
 

Quote   Quote: Originally Posted by pxfragonard View Post
Quote   Quote: Originally Posted by EzioAuditore View Post
Quote   Quote: Originally Posted by pxfragonard View Post
Thanks for a very elegant and simple solution. I take it s / d means subdirectory... very nice!
Here's what they mean:

/S Processes files in all directories in the specified path.
/D Process folders as well.

You can type attrib /? in a command window to know as what switches does it support and what they do.

If you just type /? you'll get a list of all the commands with their respective brief explanation...

You can do wonders (as i like to say) by mastering the commandline.. :P
Mastering the command line is way beyond me now but it's exciting to know you can make computers do any logical series of things because it's just a machine. I'm going to try to understand and work toward that goal.
Even a 1000 miles journey begins with a single step. So, good luck exploring!
My System SpecsSystem Spec
.


04 Apr 2012   #14
pxfragonard

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Thanks guys. Solved!!!
My System SpecsSystem Spec
04 Apr 2012   #15
writhziden

Windows 7 Home Premium 64 Bit
 
 

You're welcome; that's excellent. Glad you learned a bit along the way, too.
My System SpecsSystem Spec
04 Apr 2012   #16
pxfragonard

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

It's quite fascinating. I'm going to try to learn about the command line functions!
My System SpecsSystem Spec
30 May 2015   #17
cutedrdave

windows 7 home premium 64bit
 
 

one more question on this topic...
does the attrib command to hide a file type continue to apply to new instances of a given file type, or does it only hide files which are in existence at the time the .bat file is run?
My System SpecsSystem Spec
30 May 2015   #18
Pyprohly

Windows 8.1 Pro, Windows 7 Professional
 
 

The Attrib command will not continue to hide new instances of a file type. You will have to set the Hidden attribute onto new files for them to be hidden.
My System SpecsSystem Spec
31 May 2015   #19
cutedrdave

windows 7 home premium 64bit
 
 

Thanks for the speedy reply, Pyprohly! I figured as much, but it doesn't hurt to ask.

So, if you designate a particular file extension as a system /hidden file, how is that different from other system (hidden) files, which become hidden as part of the general operations of the system (ie without the user running a .bat file, thus setting the hidden attrib? (ie get the +h attribute)? Are they made to be hidden by the OS, or some other process that has not been discussed here?
My System SpecsSystem Spec
31 May 2015   #20
Pyprohly

Windows 8.1 Pro, Windows 7 Professional
 
 

Quote   Quote: Originally Posted by cutedrdave View Post
So, if you designate a particular file extension [...]
File Attributes are relevant per item (whether file or folder), and not per file type or extension.

Quote   Quote: Originally Posted by cutedrdave View Post
[...] as a system /hidden file, how is that different from other system (hidden) files
Under what meaning of 'different' do you refer? Would you like to give an example of a sort of difference you are expecting?

Do note that Hidden and System are two different types of File Attributes. A System marked file does not necessarily imply hidden.
My System SpecsSystem Spec
Reply

 Is there a way to hide files of only one particular extension/type?




Thread Tools





Similar help and support threads
Thread Forum
File Extension Type - Unassociate
How to Unassociate File Extension Types in Vista, Windows 7, and Windows 8 This tutorial will show you how to unassociate a file extension to no longer have a default program to open it with afterwards in Vista, Windows 7, and Windows 8. You must be logged in as an administrator to be able...
Tutorials
Can I hide files with a given extension
Downloading videos from my camcorder I get 4 files for each clip - the video file and 3 other files with the same filename but different extensions that apparently are required by the video editor. When you have several hundred clips that's a lot of extra files that you don't need to see cluttering...
General Discussion
.lnk extension and shortcut type file
I have a document that has acquired a .lnk extension and shows a Shortcut type file and I cannot open. I was suggested to go to Sart > Control Panel > Programs > Default Programs > Associate a file type or protrocol with a program > Set Assocations I did that and chose Word to open the...
General Discussion
How to hide some new extension file type?
Well I'm new here.. I found some file extensions (.modd and .moff) that I didn't want to be viewed in the folder, so I need to make them hidden. So, would someone here tell me how to make those two extension to be added to type of extension that automatically hidden by windows 7? thanks &...
Customization
Chrome gives the option to hide any extension button?
hi all has anyone seen this option in chrome yet ? read the write up on it here Chrome gives the option to hide any extension button - Chrome Plugins) http://downloadsquad.switched.com/2010/11/25/google-chrome-adds-option-to-hide-any-extensions-button/ but i cant find it in chrome 9.0.587.0...
Browsers & Mail
File type Association (.exe, .jpg, ...) Add extension?
. javascript .js files are associtated with WordPad.exe. ...should be Notepad.exe .js file extension is missing in the Default Programs-Associate file type.... How can I add and extension(.js) to the list of extensions and protocols? .
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 21:38.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App