?
Solved

Hide filenames...

Posted on 2003-02-24
6
Medium Priority
?
289 Views
Last Modified: 2010-05-01
Is there a way to use vb code to hide and unhide filenames?
0
Comment
Question by:tsugani
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:rgenius
ID: 8007424
You can change the file attribute to hide files. But then again, all hidden files can be viewed if the 'Show all files' option in Windows Explorer is set to on.

Sub Command2_Click()
  FileName = "c:\autoexec.bat"
  SetAttr FileName, GetAttr(FileName) And 31
  Text1.Text = "Archive attribute set to Off."
End Sub

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/html/msdn_msdn44.asp
0
 

Author Comment

by:tsugani
ID: 8014597
Thanx, but isn't there anything u can do to overcome the 'show all files' setting? There is a little program called Encrypted Magic Files that hides folders regardless of any windows setting. Is there a simple way to do this with vb?


I am increasing the points to 500.
0
 
LVL 1

Expert Comment

by:rgenius
ID: 8022045
Im not familiar with that program, and by the way, what files are you trying to hide? And why do you want to hide them?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:tsugani
ID: 8023855
What are u the programmer's police :) ?
Anyway i want to hide some database and some .ini files to protect them from being erased.
0
 
LVL 1

Accepted Solution

by:
rgenius earned 1000 total points
ID: 8024018
No, im from FBI - File Bureau of Investigation. :-)

Why not just rename them as different filename. Example: One of my database is hidden amongst system files in C:\windows\system, I renamed it as MYDTB.OCX eventhough its an MDB file.
0
 

Author Comment

by:tsugani
ID: 8025756
Although i am not completely satisfied with your answers if i dont get anything better in the next 2-3 days i am gonna accept one of them.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question