Joseph Walden
Joseph Walden

Reputation: 11

Extract deb file using 7z.exe

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

Answers (1)

idubnori
idubnori

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

Related Questions