The problem is rather simple.
I am making module creating zip and then adding files to the zip using delphi 6 and
ExecuteAndWait(‘7z.exe’, Format(‘u -p%s “%s” “%s” -spf2 -xr!EDZ’, [ZipPassword, ZipFileName, filePathToAdd]), SW_HIDE, ExitCode)
Basically calling invisible cmd to use 7zip cmd functionality.
Example :
192.168.1.243EDZ25_0001File.txt
The result schould be only
25_0001File.txt but i always seem to get EDZ25_0001File.txt
While running the command from the directory, it works well , but i cant be changing it for each file. Also i need to do some checks on the files so i cant just zip the whole folder.
Any insight appreciated.
While i want to keep most of the folder structure i cant seem to get the x x! xr xr! to work not while specifying full path or just relative one.
I have tried most of the 7zip commandline parameters while not achieving the desired results.
I have tried -w to set the working directory
I have tried -j to remove the directory
Tomo Skraby is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.