I would like to set the hidden attribute of a file
(attrib temp.txt +h)when the system starts up, then clear the hidden bit at closedown. (Although it may seem pointless to make a file viewable at shutdown, I am mainly interested in how the process works.)
Thanks.
Open notepad and type :
attrib +h c:\foldername\text.txt
Where you supply the correct drive and path to the file in question.
Then save as a batch file. (*.bat)
now open explorer and go to "C:\WINDOWS\Start Menu\Programs\StartUp" and create a shortcut to the batch file you just made. this should set the files attributes to hidden upon startup.
To remove the hidden flag on shutdown, make another batch file like this:
attrib -h c:\foldername\text.txt
c:\windows\rundll.exe user.exe,exit windows
then create a shortcut to this file on the desktop and double click to first remove the hidden flag and then shut down the computer.
If you're going through Hell...keep going... (Winston Churchill)
RocKeRFelLerZ
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.