how do I extract 7-zip zip file without directory
Asked Answered
V

2

10

I have this command:

7z e -oD:\Data\ODS_Source\* D:\Data\DATA_DROP\Source.zip

This results in D:\Data\ODS_Source\Source\<files>.<ext>

I need D:\Data\ODS_Source\<files>.<ext>

How do I eliminate the folder creation?

Thanks.

Vivienne answered 22/9, 2016 at 0:46 Comment(0)
F
8

Try this instead:

7z e -oD:\Data\ODS_Source D:\Data\DATA_DROP\Source.zip

Flicker answered 22/9, 2016 at 2:36 Comment(2)
well, that was simple. Thanks much.Vivienne
To clarify, the e flag causes no folders or subfolders to be created, not just the top oneOleta
F
1
  # extract with sub-dirs to ./tn
  7z x -otn lc-3.39.0.zip
  # move to . skipping ./tn/<junk_root>/*
  mv tn/**/* .
  # remove empty ./tn
  rm -rf tn

incidentally does this unscrupulously per all root (assumed) junk dirs

Futurity answered 30/12, 2021 at 4:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.