I have this 7zip command inside a batch file:
SET source="C:ProgramDataabcNMS"
SET "drive=D:"
SET folder=%DTS:~0,8%-%DTS:~8,4%
IF EXIST %source% ("c:Program Files7-Zip7z.exe" a -t7z -mx=9 -aoa -bd -mfb=64 -md=32m -v100000k -ms=on "%drive%CX.InstallBackups%folder%xProgramData_abc_NMS_standalone_%folder%.7z" "C:ProgramDataabcNMSJBoss7standalone" ./*.properties ./*.config ./server.data -xr!doc -xr!jre -xr!dll -xr!lib -xr!uninstall.exe -xr!deployments -xr!log -xr!tmp -xr!*.zip -xr!*.bin -xr!*.log.* -r) ELSE (echo abc_NMS ProgramData not found)
The intention is to compress only the files (*.properties, *.config, etc) inside “C:ProgramDataabcNMSJBoss7standalone” and its subdirectories. But for some reason, it also compresses all those file types from the entire drive D: (destination drive). What am I missing?
For example if there is d:tempxyz.properties, it will also be added and it should not.
New contributor
ARPcPro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.