The problem is the following. In the archive gets the contents of these folders, directories inside them:
Suppose the folder C:\_Work contains within subfolders:
1
2
3
A folder is C:\_Work2 - subfolders:
W
X
Z
When you open archive its content consists of both folders, ie:
test-2009-09-Full.7z
..
1
2
3
W
X
Z
I would like to see its contents as follows:
test-2009-09-Full.7z
..
_Work
_Work2
Help please realize.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
Help please solve the problem.
7z start line:
C:\Program Files\7-Zip\7z.exe" a \\Backup_server\test\month\test-2009-09-Full.7z -wC:\Windows\Temp -i@test-include.txt -r -ssw -slp -scsWIN -mmt=on -mx3 -ms=off
test-include.txt contains:
"С:\_Work\*.xls"
"С:\_Work\*.xlsx"
"С:\_Work\*.doc"
"С:\_Work\*.docx"
"С:\_Work\*.ppt"
"С:\_Work2\*.xls"
"С:\_Work2\*.xlsx"
"С:\_Work2\*.doc"
"С:\_Work2\*.docx"
"С:\_Work2\*.ppt"
The problem is the following. In the archive gets the contents of these folders, directories inside them:
Suppose the folder C:\_Work contains within subfolders:
1
2
3
A folder is C:\_Work2 - subfolders:
W
X
Z
When you open archive its content consists of both folders, ie:
test-2009-09-Full.7z
..
1
2
3
W
X
Z
I would like to see its contents as follows:
test-2009-09-Full.7z
..
_Work
_Work2
Help please realize.
cd /D C:\
7z ...
test-include.txt:
"_Work\*.xls"
...
Thank you. Everything works well.
But what if the archive from different drives?
For example:
C: \ _Work
D: \ _Work2
How to implement it on one line?
Use new archive for each drive.
include-list.txt may consist of many drives, folders or individual files.
For example:
C:\Work
F:\Work\project
\\File-server\share\doc
D:\Logs\log.txt
7z can do it?
7-zip stores last part of absolute path.
So you can do:
c:\dir1
d:\dir2
e:\d\dir3
But you will have problems with commands like
c:\dir1
d:\dir1