c36

FileExists fail when the folder is hidden

3 posts in this topic

How i can access to a hidden folder using the FileExists function?

A quick solution consist in .. first show the folder copy the file and finally hide it

But i dont want to reveal the folder .. so how it can be done without it (attrib)  ?

 

If Not FileExists("E:\hidden\info.txt") Then
 MsgBox(0,"!","Please put your generated password and then hide the folder")
Else
    MsgBox(0,"!","Done")
EndIf

Thanks

Share this post


Link to post
Share on other sites



Local $strDirectory = "C:\Temp\hidden"
Local $strFile = "\info.txt"

FileSetAttrib ( $strDirectory, "+H", 0 )                ; hide directory
FileSetAttrib ( $strDirectory & $strFile, "+H", 0 )     ; hide the file

If Not FileExists ($strDirectory & $strFile) Then
 MsgBox (0,"!","Please put your generated password and then hide the folder")
Else
    MsgBox (0,"!","Done")
EndIf

Also here on Windows XP not problem with your code. It runs fine.. I've added the FileSetAttrib() function for fun.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now