Reputation: 11
I'm using this code to extract the data.tar from a deb file but it ignores file structure and extracts every file to "files" instead of in their correct folders inside 'files'. The folders are created when extracting but they are empty.
Process.Start(@"C:\Program Files\7-Zip\7z.exe", "e " + args[0]);
Process.Start(@"C:\Program Files\7-Zip\7z.exe", "e data.tar * -ofiles");
Expected structure :
/files/Library/example
Actual structure :
/files/Library/
/files/example
Upvotes: 0
Views: 1208
Reputation: 1065
Process.Start(@"C:\Program Files\7-Zip\7z.exe", "e -y -ofiles -ir!data.tar " + args[0]);
Please refer to Command Line Switches.
Upvotes: 1