Giter Site home page Giter Site logo

unpack-directory's Introduction

Unpack-Directory

Recursively unpacks all zip files, beginning in specified directory. Uses built in Expand-Archive. Does not unpack zips within zips, but does recurse directories.

-Directory

Specifies the path to begin unpacking. REQUIRED.

-MaxDepth

Specifies the maximum depth to recursively unpack. Default: 5

-Force

Force unpacking to overwrite target directors. Can be dangerous!

-WhatIf

Test unpacking to show what would happen in a real run. Good for making sure you're set up.

-RemoveArchiveAfterUse

Force clean up of all zip files after use. Use with caution!

Note: You cannot pipe objects to Unpack-Directory.

Directory Structures

What does this work on? What directory structures is this for? Anything with a smattering of archives that might be stored in some kind of heirarchy.

Something like a music library, where the albums are archived individually. (ex., e-music.com)

C:\Music\
  Artist\
    album.zip
    album2.zip
  Artist2
    album.zip
    album2.zip

Maybe a user directory that has individual user archives. Use the -MaxDepth flag for fine-tuned control.

C:\Users\
  Miss_Yvonne\
    archive.zip
  Cowboy_Curtis\
    archive.zip
  Reba\
    archive.zip
    mail\
      another_archive.zip

Examples

At its simplest, just give it a directory.

PS> .\Unpack-Directory -Directory "C:\Music\"

You can specify a custom maximum depth to recurse. Just in case.

PS> .\Unpack-Directory -Directory "C:\Music\" -MaxDepth 3

You can include "what if", "force overwrite", and "remove archive files" switches, if you like.

PS> .\Unpack-Directory -Directory "C:\Music\" -MaxDepth 15 -WhatIf -Force -RemoveArchiveAfterUse

unpack-directory's People

Contributors

stuarttempleton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.