Encrypt hidden and unknown directories from batch file.

  • Thread starter Thread starter Predator
  • Start date Start date
P

Predator

Basically, I want to traverse a tree and encrypt every file in it, whether
the directory or file are hidden or system or not, and the directory names
are unknown, but not the whole drive mind you, just a sub-directory tree
(the starting directory is known of course). Can this be done automatically
with a 'for' command in a batch file or some similar automated way? Thanks.
 
from cipher /?:

/H Displays files with the hidden or system attributes. These
files are omitted by default.

It just displays them, I want them encrypted. Any way to?
 
Where FOO is the directory name:
cipher /e /a /s:FOO /h

If you add the "/i" switch, it will also continue even when there are
errors. The most common error you might find is when we can't encrypt
because some other process has an open handle to the file/directory - we
require exclusive access.
 
Back
Top