Comments (8)
ok, I just will delete this dll from my project. No need any projects with shit support.
from sevenzipsharp.
If you just want to ignore the directory structure in the archive, you can set the Extractor property PreserveDirectoryStructure to false and it will extract all files in the archive to the same directory. Just be careful that you don't have several files with the same name in the archive.
using (var extractor = new SevenZipExtractor("someArchive.7z"))
{
extractor.PreserveDirectoryStructure = false;
extractor.ExtractArchive("my folder");
}
from sevenzipsharp.
no no, I need PreserveDirectoryStructure=true but extract it replacing root directory.
root/folder1/file.txt => my folder/folder1/file.txt I need too
from sevenzipsharp.
I'm not aware of any such feature, but you could likely achieve this by handling each extracted file and rename/move it after extraction.
Either by unpacking to a temporary directory and moving the files, or look into using the Extractor events FileExtractionStarted
or FileExtractionFinished
.
Or even use Compressor.ModifyArchive to rename the files within the archive before extraction, but I'm not sure of the performance impacts of that.
from sevenzipsharp.
FileExtractionStarted
or FileExtractionFinished
not available to modify FileName property, it is readonly
from sevenzipsharp.
Then you'll have to rename them manually after extraction.
from sevenzipsharp.
Can you include this feauture in library?
from sevenzipsharp.
I don't see why I would, it seems to be a very niche request to rewrite part of the path of a structured archive.
Feel free to propose a pull request with the added functionality, but I won't spend time implementing this for you.
from sevenzipsharp.
Related Issues (20)
- SevenZipSharp library not working on Xamarin forms
- Extract NSIS no output using SevenShipSharp while 7zip GUI has output
- Unable open archive file for spanned zip file
- Change license to MIT
- Stuck at a certain percent while extracting encrypted 7z file
- Windows Virus Scanner - Trojan:Win32/Wacatac.B!m in Squid-Box.SevenZipSharp Version=1.5.1.15 HOT 3
- version 1.6.0.22 is unusable for extraction HOT 2
- SevenZipExtractor.ExtractFileAsync(int, Stream) fails when created with leaveOpen == false
- Copyright HOT 2
- Execution has failed due to an internal SevenZipSharp issue (0x800700ce / -2147024690). HOT 1
- VHD support HOT 1
- Archive extraction should be cancelable
- The library does not seem to support AOT compilation?
- Feature Request: Support additional compression algorithms (7zip-zstd)
- Trying to add files to an existing ZIP archive creates a NEW archive HOT 1
- Exception when calling CompressDirectory with searchPattern that returns empty file collection
- Getting Corrupted file exception for proper archives HOT 1
- How to append files to a splitted archive?
- Error during extracting the file that I just compressed HOT 5
- Publishing a new release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sevenzipsharp.