One office PC, four people, and a folder of quotations that should not be everyone's reading. The instinct is to lock the folder with a script. Resist it: Windows already ships the correct tool for this exact problem, and it costs nothing.
On a family PC, a script lock fails against a determined teenager. In an office it fails against something worse: ordinary work. Files get copied to other machines, drives get swapped by IT, and the readable password inside the script becomes shared knowledge within a week. The professional answer is boring and free: one Windows account per person, and NTFS permissions on the folder. Here is the setup, with the honest limits stated too.
Illustration. NTFS permissions are enforced by Windows for every program and every doorway — not by one polite script.
Create a standard user account for each person and give every account its own password or PIN. This single step changes the problem completely: each person's documents live in their own profile, which other standard users simply cannot open. Most office "folder locking" requests end here, because the real need was never a vault — it was a boundary. Accounts also give you a basic record of who signed in and when, something a script lock can never provide.
For a folder that lives in a shared place, use its built-in access list. Right-click the folder, open Properties → Security, and remove the groups that should not enter; add only the people or groups who should, and give them Modify rather than Full control unless they genuinely need to manage permissions. Unlike the script's rename trick, NTFS rules are checked by Windows itself for every route — Explorer, other programs, the network. A user without rights gets a clear "access denied," not a puzzle to undo in Notepad.
Be clear-eyed about two limits. First, anyone with an administrator account on that PC can take ownership of any folder and read it; NTFS is a boundary between colleagues, not a wall against the machine's owner. In practice that is usually acceptable — the admin is accountable, and actions leave traces. Second, NTFS does not survive the drive being removed or the PC being booted from a USB stick. For data that must resist even that — laptops that travel, client records, accounts data — the answer is the one from the encryption page in this set: BitLocker on the drive, with accounts and NTFS handling the everyday layer on top.
Accounts plus NTFS solve all four, using tools already installed. Save script locks for the family PC, where the stakes and the threat are honestly different.
See the locking script built and tested live, then decide honestly whether it is strong enough for your folder.
▶️ Watch Full VideoNot really. Its password is readable inside the script file, it keeps no access log, it only hides the folder on that one PC, and the hidden folder can be deleted by anyone tidying up. Offices should use separate user accounts with NTFS permissions, plus BitLocker where data must resist physical access.
NTFS rules are enforced by Windows itself for every user and every program. Right-click the folder, open Properties and the Security tab, and allow only the people or groups who need access. Users without rights are refused outright — there is no script to read and no rename trick to undo.
Yes. A local administrator can take ownership and grant themselves access, so NTFS is a boundary between colleagues, not against the PC's owner. If data must be protected even from administrators or from someone removing the drive, encrypt it — BitLocker for the drive, VeraCrypt for a container.