VB6 Password on folder.

Hi,

Can I set a password on a folder that I will use my program to open this folder only after inputing the password?



Thanks,
Angel
LVL 2
2AngelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richie_SimonettiIT OperationsCommented:
i think not, at least if you don't use a third party software like Folder Guard.
but that is only half of the solution (setting a pwd for a folder)
0
2AngelAuthor Commented:
Richie, like always - thank you for your quick replay.

If I will create a folder using a dos prompt and I will call this folder ("directory") as a graphic symbol (you know, using the Alt and keying the number, let say, Alt159....) It will not be accessible in MsWindows Explorer (it's good enough for me) - so the question is: can I access this folder using my VB6 program?


Thanks again
Angel
0
Richie_SimonettiIT OperationsCommented:
humm, if it is not visible with windows explorer, why it could be seen with VB functions that uses the same calls?
On the other hand, if you know that "hidden" name, try to put some files on it and do a simple test:


dim sfile as string

sfile=dir$(hiddenfolderpath_and_name & "\*.*",vbarchive)

do while sfile<>""
     debug.print sfile
sfile=dir$()
loop
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

2AngelAuthor Commented:
I don't get it - the name of the foder is _ no mater what I called it - so, who can I key in program the "hiddenfolderpath_and_name"?


tks
0
Richie_SimonettiIT OperationsCommented:
I don't get it either!
in other words :

dim sfile as string

sfile=dir$("c:\your_graphic_symbol_goes_here" & "\*.*",vbarchive)

do while sfile<>""
     debug.print sfile
sfile=dir$()
loop
0
2AngelAuthor Commented:
Dear Richie, my meaning was that I can't enter a graphic symbol to my VB editor.....
0
Richie_SimonettiIT OperationsCommented:
well, what is the symbol?, i tried with your suggestion (alt159) and it works.
Anyway,
could you try with:


sfile=dir$("c:\" & Chr$(159)  & "\*.*",vbarchive)
?
or i misunderstood again?

0
2AngelAuthor Commented:
ooooopppppppssssssssss
so stopid of me..................

I'm sorry and tks alot!!!!


Angel

p.s. - can I set a password chck-up before this action (before accessing this folder show a window to enter the password, if its o.k. then access...., if not then msgbox.......)?

tks
0
Richie_SimonettiIT OperationsCommented:
Why not?
0
2AngelAuthor Commented:
o.k. - I will ask a new question.....



Richie,
Thank you for lighting my eyes :-)
0
Richie_SimonettiIT OperationsCommented:
Glad to help. Hope i didn't blind them with so many light
;)

PS: it would nice to know which kind of program are you trying to do.
0
2AngelAuthor Commented:
it's a simpel program to save my files on a shered computer and to retrive them automaticly.....
0
Richie_SimonettiIT OperationsCommented:
So creating aform to enter password should be simple to achieve.
0
2AngelAuthor Commented:
I am just an amateur..........
0
Richie_SimonettiIT OperationsCommented:
Ah, that's another matter, so, do you need help with that form?
0
2AngelAuthor Commented:
I'll be glad.............  :-)
0
Richie_SimonettiIT OperationsCommented:
Well, first we need to know how would you allow user to see the files, where would you display them as user can pick up them?
0
2AngelAuthor Commented:
I thought to create a button for "Hide" and a button for "Show".
The button "Hide" will move all file from DocFile to Doc&chr$(159) and the button "Show" will move the back after inserting a correct password that I will but in advance.
There only one user (I am... )


Thank you for your help.

Angel

p.s. - my solution above, about creating the a folder with Alt159 working good on Windows95/me but in Windows XP this folder is accessible - do you have any solution for that?
0
Richie_SimonettiIT OperationsCommented:
it is accesible in W2K too.
0
2AngelAuthor Commented:
int's not good........
0
2AngelAuthor Commented:
it's not good......
0
2AngelAuthor Commented:
can I simple hide the folder? (I don't need some thing "stong")
0
Richie_SimonettiIT OperationsCommented:
You can hide the folder but if you set window explorer to show hidden folder/files it could be visible.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.