staticrypt icon indicating copy to clipboard operation
staticrypt copied to clipboard

Overwrite all HTML files recursively keeping the directory structure

Open royfrancis opened this issue 11 months ago • 1 comments

My understanding is that -d . can be used to specify that files should be overwritten. For single files that seems to work

staticrypt index.html -d . -p mylongpassword

For multiple files, it works too

staticrypt index.html index2.html -d . -p mylongpassword

But, I cannot see a way to make it work for a nested structure.

|- index1.html
|- index2.html
\- folder/
   \- index3.html

I have tried -r, but

# outputs to a separate folder
staticrypt . -r -p mylongpassword

# still outputs to a different folder
staticrypt . -r -d . -p mylongpassword

This brings the nested files out into the root.

staticrypt $(find . -type f -name "*.html") -d . -p mylongpassword

I must be missing something. In short, how do I encrypt all html files recursively in a directory structure and overwrite them exactly where they are?

staticrypt 3.5.1

royfrancis avatar Feb 07 '25 08:02 royfrancis

Based on #196, this seems to be the solution:

staticrypt * -r -d . -p mylongpassword

royfrancis avatar Feb 07 '25 09:02 royfrancis