Batch script to make folders hidden
I am glad you asked your question here. I'm hoping to explain why what you are trying to do is a bad idea. I cannot speak much for improving your batch as that is not my strong point but that should not matter as the focus of the review is ....

Security Through Obscurity

If you are unfamiliar with that phrase as a concept Wikipedia has a good primer on it. 

If I understand the script correctly it is designed to mark a folder hidden. If it is already hidden then using a password will unlock it. You have a very flawed approach to security as it would only keep the most naive of users in the dark. The following is a combination of points, in no particular order (since the really refer to each other), that illustrate why you should not bother doing this.

Hiding a folder does not prevent access to it. A simple control panel change would expose those folders and since the security of the folder has not changed a user can just walk right in. Or if you knew the full path then you can just type it in Windows Explorer or the Run menu.


  The last two things are quite cumbersome.


You have the "password" hard-coded in the script. It is a very trivial action to make changes. Again this is only keeping a certain breed of user from accessing your document location. Since neither the script or folder are technically secure then it is moot. 

PowerShell code is doing nothing but masking the view. You take in a secure password but immediately unsecured it. The only thing that approach would prevent is someone directly behind you watching what you are doing and not looking directly at the keyboard. 

Consider PowerShell

For reasons stated above I cannot condone this code but there are some concepts you should be aware of that PowerShell can do better. While you code is mostly batch you have a splash of PowerShell there so I think you have at least a vague familiarity with it.

Use functions

As I am sure you know there are several instances of repeated code. Those could be easily replaced with some simple functions that you could call in a loop that runs 3 times for example. 

A much improved choice menu

PowerShell has a great way of creating menus guiding user input and acting on the results. It is not too hard to get a grasp at first glance so I am going to include the code snippet from the from the front of that article. 


$title = "Delete Files"
$message = "Do you want to delete the remaining files in the folder?"

$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&amp;Yes", `
    "Deletes all the files in the folder."

$no = New-Object System.Management.Automation.Host.ChoiceDescription "&amp;No", `
    "Retains all the files in the folder."

$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)

$result = $host.ui.PromptForChoice($title, $message, $options, 0) 

switch ($result)
{
    0 {"You selected Yes."}
    1 {"You selected No."}
}



Consider Encryption

If you were still concerned about the safety and security of your documents where multiple users would have access consider an encryption solution. It's too much to cover here but there are several simple approaches involving encryption software (I cannot recommend any specific one.).