Page 1 of 2

[ExclusionException] not working

Posted: Thu May 26, 2016 2:05 pm
by bliblubli
With this config file:

Code: Select all

[ExclusionList]
\
[ExclusionException]
\Users\test\AppData\Local\test
and following command: wim capture c:\ d:\appdata.wim "20160526" --config="configwim.txt"

I get 0 files, although the test directory have a lot of them. What am I doing wrong?

Code: Select all

Scanning "c:\"

Excluding "\\?\c:\" from capture
0 bytes scanned (0 files, 0 directories)

Re: [ExclusionException] not working

Posted: Fri May 27, 2016 3:57 am
by synchronicity
Files underneath an excluded directory are not scanned. Therefore, in your example, the path \Users\test\AppData\Local\test is never seen by wimlib at all. Currently, the use case for [ExclusionException] is to name specific file(s) which should be included despite matching a wildcard pattern. This is different from what you're trying to do, which is specifying an included file underneath an excluded directory.

Making your use case work is something to think about, but it seems difficult. Either wimlib would need to scan everything regardless of [ExclusionList], or it would need to scan from the root plus all the files named in [ExclusionException], of which there may be many.

For what it's worth, Microsoft's WIMGAPI has the same behavior as wimlib regarding this matter.

Re: [ExclusionException] not working

Posted: Sat May 28, 2016 8:47 pm
by bliblubli
Is there a best way to save different directories with one command? Point would be to have a list of directories to regularly backup.

Re: [ExclusionException] not working

Posted: Sat May 28, 2016 8:52 pm
by synchronicity
Yes, just use "source list" mode. For the example you gave, create sources.txt containing:

Code: Select all

c:\Users\test\AppData\Local\test \Users\test\AppData\Local\test
Then do:

Code: Select all

wimcapture sources.txt out.wim --source-list
See the documentation for details.

Re: [ExclusionException] not working

Posted: Sun May 29, 2016 4:00 pm
by bliblubli
:oops: I don't know how I could miss that one. Thank you.

Re: [ExclusionException] not working

Posted: Mon Jun 06, 2016 2:26 pm
by bliblubli
After making a custom config file, I have 2 questions:
- how do you add your list to the default one? I made a backup of the windows partition, but the files and folders that where ignored by default (recycler etc.) where included, it seems because I specified a config file.
- When you apply a wim made with a source list, how do you prevent overwriting existing files, and better, how would you get the equivalent of "only overwrite if more recent"?

Re: [ExclusionException] not working

Posted: Mon Jun 06, 2016 6:18 pm
by synchronicity
Neither of those features is currently implemented.

Re: [ExclusionException] not working

Posted: Wed Jun 08, 2016 2:17 am
by synchronicity
I should add, however, that the default capture configuration file is documented [1], so you could manually create a new configuration file based on that file.

[1] https://wimlib.net/man1/wimlib-imagex-capture.html

Re: [ExclusionException] not working

Posted: Sat Jun 11, 2016 7:02 pm
by bliblubli
Yes, it works, thank you :) An option for what to do in conflict cases would be really great (replace, replace only if newer, keep both copies, skip)

Re: [ExclusionException] not working

Posted: Mon Sep 04, 2017 11:00 pm
by DirkM
My apologies for continuing this old topic but I'm currently trying to figure out why my capture is not picking up certain files.

I'm using the following config file:
[ExclusionList]
\$ntfs.log
\hiberfil.sys
\pagefile.sys
\swapfile.sys
\System Volume Information
\RECYCLER
\$RECYCLE.BIN
\$Recycle.Bin
\Windows\CSC
\Users\test\AppData
[ExclusionException]
\Users\test\AppData\Local\Microsoft\Outlook\some.pst
\Users\test\Documents\Outlook Files\someother.pst

My resulting WIM is including the someother.pst (expected because it wasn't excluded) but it does not include \Users\test\AppData\Local\Microsoft\Outlook\some.pst because the parent directory \users\test\AppData is excluded. \Users\test\AppData\Local\Microsoft\Outlook\some.pst exists and is confirmed present when I capture the wim.

Any hint on what I'm doing wrong would be appreciated.

Thanks,
Dirk