I have found that if I have a .BAT file that calls 7z rapidly multiple times it throws an error like:
7-Zip cannot move the file
Archive.tar.tmp
Access is denied
using:
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
Putting a 1 second delay after each call seems to fix the problem:
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
Win XP+SP3+all updates
7z is 9.22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have found that if I have a .BAT file that calls 7z rapidly multiple times it throws an error like:
7-Zip cannot move the file
Archive.tar.tmp
Access is denied
using:
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
7za.exe a "%ARCPATH%.tar" <file path="">
Putting a 1 second delay after each call seems to fix the problem:
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
7za.exe a "%ARCPATH%.tar" <file path=""> && sleep 1
Win XP+SP3+all updates
7z is 9.22