Archive Attrs is not cleared

Mar 12, 2014 at 9:33 AM
Edited Mar 12, 2014 at 9:34 AM
OS: windows server 2008 r2 (DC)
Domain admins right
ps version 2
7zip: 9.20

At time to time when script processed it doesn't clear "Archive Attrs" for all files in source folder.
Have got simple selection file:

Run script:
.\7zbackup.ps1 --type full --selection selection-publictest.txt --destpath E:\Backup\test

7zBackup.ps1 ver. 1.9.7-Stable (

Started : 03/12/2014 13:04:55
Backup Type : full
Archive Name : PublicTest-full-20140312-1304.7z
Archive Type : 7z
Destination : E:\Backup\test
Selection : E:\backup\test\selection-publictest.txt
Recursion Depth : 100
Archive Attrs : Will be cleared
Rotate : Keep all archives
7Zip Switches : -bd -mx1 -m0=lzma2 -mmt=6 -ms=off -ssw -mf=off -mtc=on -slp -scsUTF-8 -sccUTF-8

Backup from sources

  • PublicTest <== e:\Backup\test\1
Cleanup Files Criteria


Include Files Criteria

All files

Exclude Files Criteria


Exclude Paths Criteria


Stop Recursion Criteria


Scanning ...

Selected 47 out of 47 files in 16 folders. 2 022,93 MBytes to backup
Completed in 0 days, 0 hours, 0 minutes, 0 seconds

Selection Details

Extension Count Total MB Abs % Inc %

.fbr 11 1 072,66 53,02 53,02
.avi 4 892,78 44,13 97,16
.... skiped ......
                              ----------- -----------------
Total 47 2 022,93
                              =========== =================
Created PublicTest-full-20140312-1304.7z in E:\Backup\test
Archive Size 1 893,77 MB. Compression 6,38 %
Completed in 0 days, 0 hours, 1 minutes, 15 seconds
Perfomance 26,63 MB/Sec.

All Done !! Yuppieee

Smth wrong with script?
Mar 13, 2014 at 1:50 PM
Hi ArcticVoice,
this should not happen. Also your statement seems to depict a random behaviour.

Have you had the opportunity to monitor each phase of the script ?
Is the "Clearing Archive Bit From Archived Files" phase being executed ?
Is it possible you have pressed any key during the script ?
The user's credentials operating the script do allow files to be written ?

Best regards
Mar 13, 2014 at 2:56 PM

Thanks for your answer.
  1. I can do some test of cos.
  2. ""Clearing Archive Bit From Archived Files" phase being executed" - i don't know what do you mean exactly. Script start and stop normally, arh has been created without any errors... Just look source files and arh attrs still present there on all files.
  3. Not sure of cos. Mostly i minimize PS window and work with server when the script is running.
  4. Yes, script run under admin permissions and this account has full permissions on file system (i can clear this arh attrs manually for expl)
Feb 5 at 6:29 PM
i have the same issue with v2.0.4.

I found the reason.
If in the file names are special characters like
'ä', 'ö' or 'ü', etc..
the archive bits are not cleared then.

Feb 21 at 12:26 PM

I have the same issue with several files too.
To rename them is no solution for me. I found out that in the compress-detail.txt the files with umlaut (ÄÖÜ etc.) are already saved wrong. (the have "??" in their name)
i experimented with the encoding and instead of ?? i now have ++. ^^
so no solution. is there any help for that problem?

Jun 20 at 1:08 PM
Edited Jun 20 at 1:19 PM
We found the solution. Codepage of command line must be setted to UTF-8.

You can do it from command line or as part of script file: chcp 65001
or you can prepare command line to UTF-8 support via registry:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v 000 /t REG_SZ /d "Lucida Console"

REG ADD HKCU\Console /v CodePage /t REG_DWORD /d 65001 /f

REG ADD HKCU\Console /v FaceName /t REG_SZ /d "Lucida Console" /f

On Windows Server 2008 R2 (or maybe some other old systems) you cant change codepage from cmd using 'chcp 65001' because of font, then use regedit to change it globaly for current user, as mentioned above.