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.
 
start /run
cipher.exe /?
and check out use of /s and /a with /h
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top