LeTay
asked on
7zip exclude a list of directories (and their content)
I want to use an exclude file containing a list of directories to (recursively) exclude from a 7zip backup
The command look like 7zip a .... -x@listfile
What is the syntax INSIDE the listfile ?
For example to exclude c:\blabla and d:\test ?
Thanks
The command look like 7zip a .... -x@listfile
What is the syntax INSIDE the listfile ?
For example to exclude c:\blabla and d:\test ?
Thanks
ASKER
I have done something like this : 7z a .... -x@c:\exclude.lst
The c:\exluce.lst contains one line (test) c:\mydir\*
But that directory is taken and zipped !
The c:\exluce.lst contains one line (test) c:\mydir\*
But that directory is taken and zipped !
Try c:\mydir\*.*
ASKER
Same result
Is a kind of "recursive" info not missing somewhere ?
Is a kind of "recursive" info not missing somewhere ?
So files from that folder still end up in the archive or is it just and empty directory?
If files are being archived try wildcardng some of them to see if that's working for you.
Maybe try c:\mydir\*.txt
If files are being archived try wildcardng some of them to see if that's working for you.
Maybe try c:\mydir\*.txt
ASKER
All the files are included, absolutely all !
I tried also at command line -xr@ ... instead of -x@ .... same
I tried also at command line -xr@ ... instead of -x@ .... same
Is it actually executing your list file? Maybe try the complet path or runing from the same directory as the list file.
ASKER
Very strange even specifying c:\midir\*.txt is taking the .txt files
ASKER
Yes, I put the complete path for the directory
Here the syntax I used
"c:\program files\7-Zip\7z.exe" a -r -mx1 -y -tzip -xr@c:\data\bat\exclude.ls t c:\data\bat\save.zip @c:\data\bat\include.lst
Here the syntax I used
"c:\program files\7-Zip\7z.exe" a -r -mx1 -y -tzip -xr@c:\data\bat\exclude.ls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
its works fine thanks, but i dont want files to be left out in the folder after archiving and only the exclude list files should be there. can you pls give me a solution for this?
thanks in advance
thanks in advance
it was very useful info in this URL
For your example try
c:\blabla\*
d:\test\*
*subdirname*
for all the lines.
and if i have some extensions that i don't want ONLY in some subdirs i use:
*someofthesubdirtext*.exte
For **example**, i can create an exclude_file.txt to be used with an -xr@excludefile.txt switch, containing for example:
*local\adobe*
*local\Microsoft*
*roaming\Microsoft*
*temporary internet*
*temp\*.exe
... and this for sure works GREAT. In the above example i excluded three of the main space-consuming directories in a typical backup of a Vista user profile (obviously no Win.Mail backup was performed) , IE temporary internet files (all), and all the exe files found in typical temp directory...