Menu

#438 7z fails to rename the tmp file to original Name

open
None
5
2022-11-14
2022-11-11
Dieter Ch
No

When adding further files to an already existing 7z file, it generates a *.tmp file and then "tries" to delete the original file and rename the tmp file.
The error message appears
- Exit code: 2
and the file to be deleted only disappears a few seconds later

command:
7Z a -t7z SUD\SUD_UZ.7z SUD\SUDxx

Because these files are on the net (not local), the original file is not deleted as quickly as 7z would like.
7z fails to rename the tmp file to original Name (because at that moment it still exists).

errors:
\SUD\SUD_UZ.7z.tmp
\SUD\SUD_UZ.7z
Cannot create a file when that file already exists.

Are there any parameters by which I can influence that. I couldn't find one.
- e.g. that the TMP file gets a new name and does not have to be renamed.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2022-11-11

    Please describe all software and settings that are related to this network problem.

     
  • Dieter Ch

    Dieter Ch - 2022-11-14

    I made a movie of the situation. (see attachment)
    By the 5th second, the error appeared of 7z, but it took until the 25th second for it to delete the file.

    The time till the file is deletetd always differs, normally it's about 2 sec. after the error appears

    It is running in a Delphi-packet or in a Dos-batch, both with the same result.

    In the company's network I don't get the information, my guess is, it is the virus-checker, blocking this file to delete
    The result file is about 100MB

    But sometimes no error occurs.

    dos-code:
    COPY r:\SI_TOOLS\SI_C\DELPHI\SUDCGEN\SuD_Basis_Zip\SuD_Basis.7z \DATEN\SBB\%1\SUD\SUD_t.7z
    timeout /T 3 /nobreak >nul
    C:\"PROGRAM FILES"\7-ZIP\7Z a -t7z \DATEN\SBB\%1\SUD\SUD_t.7z \DATEN\SBB\%1\SUD\AnlagenProjektierung 1>NUL 2>NUL

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.