Howto Question: Save and Archive via 7-zip with password
-
Hi,
I am editing a lot of files where the saved file needs to be archived with a password. For example I edit thefile.xml. That file needs to be saved to disk at the location it was opened and it needs to be archived to thefile.7z with a password (it is the same password for all files). Is there a way to set this up - even as a new menu item for the 7-zip archive step?
-
Is this Notepad++ related?
-
install NppExec and save something like this as the script to be executed.
npp_save cd D:\PortableApps\PortableApps\7-ZipPortable\App\7-Zip64 7z.exe a -pYOURPASSWORD $(CURRENT_DIRECTORY)\$(NAME_PART).zip $(FULL_CURRENT_PATH)
Of course you need to replace YOURPASSWORD and the .zip extension can also be a 7z extension.
Changing the directory is only needed if 7z.exe can’t be find.
7z.exe -? gives you additional informations about the parameters accepted.Cheers
Claudia -
@Claudia-Frank Thanks for this info. That was the part I was missing. I appreciate your understanding of the question and providing a very helpful solution.
@Scott-Sumner240 - Thanks for your contribution to the conversation. Maybe you can learn from the very helpful response from Claudia as I did.
-
Point taken; apologies. Lately my brain shuts down before reading all the way through some posts–you wouldn’t believe how many are about things that don’t related to N++ at all, or that are about things that you really shouldn’t use N++ for.