how to define a file type as "system file"

J

John Jay Smith

I would like to do that in order to have some file types always hidden
without having to manualy select each of them and giving it the "hidden"
attribute.

This must be possible from the registry.. but how?

Thanks

--
Kenny - www.ComputerBoom.com

"Any sufficiently advanced technology is indistinguishable from magic."

-Arthur C. Clarke
--
 
T

Ted Zieglar

An application file cannot be masqueraded as a system file.

What exactly are you trying to accomplish?
 
J

John Jay Smith

I did not say anything about an application file.

Let me repeat...

I would like to some file types as sytem files so that they will always be
hidden
without having to manualy select each of them and giving it the "hidden"
attribute.

for example all files with .bc extension to be hidden.



--
Kenny - www.ComputerBoom.com

"Any sufficiently advanced technology is indistinguishable from magic."

-Arthur C. Clarke
--
Ted Zieglar said:
An application file cannot be masqueraded as a system file.

What exactly are you trying to accomplish?
 
G

Gospel

Well why manually select them anyway? A batch file, for example

@echo off
attrib +h *.txt /s

Can apply or remove an attibute from every file of that folder and
subfolders. Here it adds the hidden attribute to every text file (*.txt) in
the folder the batch file is run from and every subfolder.

Run from any folder and that folder and all subfolders get processed. Run it
on the root of a drive and it should go through all the folders of the
entire drive adding or removing attributes as desired. You could run it as a
log off script so that all files of that type are set each time you log off.
 
J

John Jay Smith

I dont want to do it like that...

thanks anyway

--
Kenny - www.ComputerBoom.com

"Any sufficiently advanced technology is indistinguishable from magic."

-Arthur C. Clarke
--
 
J

John Jay Smith

I dont want to do it like that...

thanks anyway

--
Kenny - www.ComputerBoom.com

"Any sufficiently advanced technology is indistinguishable from magic."

-Arthur C. Clarke
--
 
G

Gospel

I guess you are asking how can one set it so that when a file of a specific
extension e.g. .txt is created, it automatically assumes the hidden
attribute (or whatever attribute you wish) .. right?? I'm not sure and have
been seaching the web for an answer. Usually it is up to the application
creating a file to set its attributes. E.g. some Paint program might be
designed to create all its .paint files as "Hidden". Otherwise I'm stumped.
I looked at the CLSID subkey but am drawing a blank .. perhaps you could
contact Microsoft and add it to the wish-list.

Is there some reason why you need files set to hidden the moment you create
them? Because a log-off script would effectively be the same thing. When you
log-off all the files of that extension could be made hidden .. so if
someone logs back on, well, they will be hidden.

Anyway, I hope you find out how. I looked at Attribute Magic and some
others - no go - none actually associate attributes to file extensions.
 
W

Wesley Vogel

That's what she said.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
G

Guest

Goslel's idea is probably the fastest way: by using his batch file.

@echo off
attrib +h *.<file_extension> /s

I'm not sure what you want to accomplish. A logoff script, like was cited
earlier, would do it once you logoff your machine without intervention by
you, but would add a little bit of time to the logoff prior to shutdown. Just
create the above batch file using the notepad editor and save it using a
".bat" extension.

Mack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top