-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter on directory names and recursion #22
Comments
Can you provide me with a simple example, which can help me to reproduce the issue? |
Getting this together for you today |
Here is a script to simulate the directory structure I was dealing with that day. I have simplified a bit, but the basic gist is, I would expect the matching folders and their contents to be archived. |
Hi @slestak thanks for the repro. The reason for the empty ZIP file is that Here's the command which I think will get the result you're expecting: gci -Path .\1305\13050* -Recurse -Include *.csv | Compress-7Zip -Format Zip -ArchiveFileName .\13050_001_099.zip This command first gets all CSV files in directories matching I'm afraid that the |
I too am looking for a way to preserve the directory structure and every permutation of parameters (including using gci as shown above) doesn't preserve the structure. |
Trying to recursively pack a selection of files and directories. The resulting zip file is does not have the contents I would expect.
The item on the left was created in windows explorer using the 7zip gui.
Note that the item on the right has all of the folders in the source path. This can be seen by 2 points, the folder count is 835, and the "Testing" string lists folder 1305584 which should not be present.
I am assuming that recursion did not occur because even though there were more input objects to the item on the right, the archive size is smaller.
I might be able to look at this later, but wanted to get you the example in case I am misunderstanding something or it is a trivial fix.
The text was updated successfully, but these errors were encountered: