7zip logging & left-over .tmp files

batch-filecompressionlogging

I have a batch file that runs nightly to compress some PST's, it uses 7zip & generally is pretty successful.

However it tends to create left-over .tmp files (9 over 2 days), I want to delete these. According to multiple 7zip forums, patch requests, & other websites I can change the directory it stores those, but nothing more. I speculate this shouldn't be happening & something is wrong, furthermore occasionally it has skipped files. I want to keep a log, even if everything is fine, its a good fall back if something goes funky.

My batch file has a separate line/command for each PST: 7z.exe u -t7z JENNIFER.7z JENNIFER.PST -r. I have successfully gotten a log when I append " >7zip.log". However when I do that for two different lines/commands only the last one is logged, thus I assume its being overwritten.

Short of making one long complex command (as I have PST over 2GB's among other files in that folder that I don't want compressed); does anyone have any other ideas/thoughts

Side note: Now that I think about it my backup agent might be interrupting access to .7z files, thus causing all this. However oddly enough the batch file is a 'windows scheduled task' & it ran with result 0x0 (which if I remember right is success) & backup was also successful. Either way I'd like to learn how to properly log with 7zip & feedback on why .tmp files may be left over from a compression command

Best Answer

Most backup program does not lock file. Antivirus may lock the file for checking and keep it from being delete. So you can disable anti virus first.