Jonathan Leahy - 2021-12-03

Hello,

I don't know if this is possible, I haven't been able to find the solution anywhere.

I want to use the Add command "a" and also rename the file I am adding, all in the same (one) command.

possible example:

7z a c:\archive3.zip "C:\doc1.txt" "newnameofdoc1.txt"

This would add doc1.txt to the archive3.zip, but rename it to "newnameofdoc1.txt"

My current solution is to first add and then rename (two commands), which is taking extra time.

command 1. 7z a c:\archive3.zip "C:\doc1.txt"
command 2. 7z rn c:\archive3.zip "doc1.txt" "newnameofdoc1.txt"

Thanks for your help.