How to use the bat or vbs to prevent the opening of a folder ?

Can you reword the question? I understand English is not your first langauge so it may be hard but I cannot make sense of what you are trying to do.
 
When someone tried to access this folder, a bat or vbs will prevent the opening of this folder


Chinese is my first langauge,and my English is not well
 
Finally we're getting somewhere ;)

I don't think it's possible using a simple VB script or BAT, as those have rather limited feature set (as script languages usually do). You may be able of preventing people from accessing the folder through explorer using these, but I don't think you can keep people from accessing through command line or so on. You might be able of doing it, but I'll be of very little help as my experience with scripting languages is, well, almost zero, but as I said, they have very limited features and are only designed for accomplishing small, lightweight tasks without the need for compilers/such (and JS/VBS were designed with web development in mind)

Is there any particular reason that you would go through the trouble of making the program yourself, as there are free programs out there that can accomplish the task? If you just want to do it for programming practice or something like that, I think you'll have to resort to more powerful, "real" programming languages (C++, Delphi, Visual Basic,... these are languages I might even be able of helping with).

Again, if your only goal is protecting your files, the easiest option would be getting a free program to do it... I can't think of any right now, but I'm sure someone will drop by and suggest some.
 
Back
Top