Hide Folders application iconHide Folders
User guide
×
Menu
Index
  • Command line options

Command line options

 
Hide Folders allows you to protect and unprotect folders from the command line.
 
Command line parameters:
 
hf.exe /ADD /method path
Adds the specified path to the list and sets the protection method
method: H - Hide, L - Lock, HL - Hide & Lock, RO - Read Only, NOX - No Execute, U - No Protection.
hf.exe /REMOVE path password
Removes the specified path from the list
hf.exe /OFF password
Disables the protection if the password is correct
hf.exe /ON
Re-enables protection
hf.exe /STATUS
Returns the protection status to the calling process as exit code.
0 - protection is enabled
1- protection is disabled
The password must not contain spaces.
 
Examples
hf.exe /ADD /HL C:\Test - hide and lock C:\Test
hf.exe /ADD /H "C:\My Folder\123" - hide C:\My Folder\123
hf.exe /ADD /L "C:\Test Folder" - lock C:\Test Folder
hf.exe /ADD /RO C:\Test\* - make the contents of C:\Test read only
hf.exe /ADD /NOX C:\Test\ -  prevent EXE files in the C:\Test folder from running
hf.exe /REMOVE C:\Test - remove C:\Test from the list
hf.exe /OFF Password - disable protection
hf.exe /ON - enable protection
 
 
checking protection status
checkstatus.cmd:
@echo off
hf.exe /status
if errorlevel 1 goto disabled
echo PROTECTION ENABLED
goto end
:disabled
echo PROTECTION DISABLED
:end