mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ add: batch script to bulk encrypt files of given directory with encryption tool + fix: existing bash test script for encryption tool
28 lines
537 B
Batchfile
28 lines
537 B
Batchfile
@echo off
|
|
setlocal enableextensions
|
|
|
|
set NP3ENCRYPTER=%~dp0np3encrypt.exe
|
|
|
|
echo. Change directory to "%~1"
|
|
pushd "%~1"
|
|
|
|
echo. Iterating all files of "%CD%"
|
|
for /r %%f in (*) do call :ENCRYPT "%%f" "%2"
|
|
popd
|
|
|
|
goto :END
|
|
:: ----------------------------------------------------------------------------
|
|
|
|
:ENCRYPT
|
|
set fn=%~nx1
|
|
set passphrase=%~2
|
|
echo. Encrypting file "%fn%"
|
|
%NP3ENCRYPTER% ef "%fn%" "%fn%.enc" %passphrase%
|
|
goto :eof
|
|
:: ----------------------------------------------------------------------------
|
|
|
|
:END
|
|
pause
|
|
::popd
|
|
endlocal
|