An open API service indexing awesome lists of open source software.

https://github.com/carlosulisesochoa/subdirectory-file-extractor-powershell

PowerShell script that moves all the files from subdirectories to the root directory
https://github.com/carlosulisesochoa/subdirectory-file-extractor-powershell

powershell script scripting subdirectory-file-extractor windows

Last synced: 2 months ago
JSON representation

PowerShell script that moves all the files from subdirectories to the root directory

Awesome Lists containing this project

README

          

# Subdirectory File Extractor

Subdirectory File Extractor is a PowerShell script that moves all the files from subdirectories to the root directory, while preventing duplicates by renaming them with the parent directory name.


## Table of Contents

- [System Requirements](#system-requirements)
- [Usage](#usage)
- [Result](#result)
- [License](#license)
- [About developer](#about-developer)


## System Requirements

- Windows OS (tested on Windows 10 and 11)
- PowerShell 5.1 or later


## Usage

1. [Download](https://raw.githubusercontent.com/CarlosUlisesOchoa/Subdirectory-file-extractor-PowerShell-/main/files-extractor.ps1) the `files-extractor.ps1` script.
2. Save the script to a directory on your computer.
3. Open PowerShell and navigate to the directory where the script is saved.
4. Run the script with the `-d` parameter and specify the directory


Example:


PowerShell:
```PowerShell
.\files-extractor.ps1 -d "C:\Shane\my-root-dir"
```


## Result


**Before:**

Image 1


**After:**

Image 2


## License

This project is released under the [MIT License](LICENSE).


## About developer

Visit my web [Carlos Ochoa](https://carlos8a.com)


---

**Note:** If you encounter any issues with the script, please report them [here](https://github.com/CarlosUlisesOchoa/Subdirectory-file-extractor-PowerShell/issues). Contributions are welcome!