Replies: 3 comments 1 reply
-
There are some examples of creating archives with manual control in the wiki (e.g. https://github.com/icsharpcode/SharpZipLib/wiki/GZip-and-Tar-Samples#-create-a-tar-or-tgz-with-control-over-filenames-and-data-source), possibly something like that but with either manually filtering the list of files, or using the version of Directory.GetFiles that takes a search pattern? |
Beta Was this translation helpful? Give feedback.
-
I dont get it to work xD It always says file test.tar.gz i used by another process if i try to save the tar.gz in the source dir |
Beta Was this translation helpful? Give feedback.
-
I suppose that using the built in functions or that example and calling Directory.GetFiles on the root folder after creating the output file will then try to include that file. Could work if Directory.GetFiles is called on the root before creating the output file, or, if all files in the root directory should be skipped, using Directory.GetDirectories on the root folder, and only looking at the files inside those. |
Beta Was this translation helpful? Give feedback.
-
This is not a issue, it´s a question.
Is there a way to pack all files in a directory (without the root directory) and exclude files) from the tar.gz?
And store the tar.gz in the sourcedirectory?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions