I am using PHP where I am trying to ZIP everything inside the folder except one folder called assets. I have tried this code below with a password for security but don’t know how I add the function which would be to ignore one folder called assets
If there’s nothing in the zip documentation that tells you how to exclude a particular folder, why not do it in code? Use something like opendir() and readdir() to read through the path contents and just exclude whichever folders or files that you don’t want in the zip file.
ETA: a quick search for “zip exclude a folder” suggests that the -x parameter can be used to specify the folder that you want to exclude.
I read this article here but when I run this code in cmd or PowerShell the error I am getting. even I downloaded the WinRAR software.
Please help how do I achieve the goal…
zip -r folder.zip folder
'zip' is not recognized as an internal or external command,
operable program or batch file.