Unfurl
The concept of unfurl
ing is to take all items from within a given tree and move them as far up the tree as possible.
folder
└───subfolder1
│ └───subfolder2
│ │ └───subfolder3
│ │ │ │ file.txt
│ │ │ └───subfolder4
│ │ │ │ │ file.txt
Should end up turning into something looking like using a respectful unfurl:
folder
│ file.txt
└───subfolder4
│ │ file.txt
Or, by using a non-respectful furl:
folder
│ file.txt
│ file.txt
Installation
Because this program uses the docopt library, to use this program you have to install the library by running:
pip install docopt==0.6.2
Usage
unfurl -h
orunfurl --help
- Show program helpunfurl -v
orunfurl --version
- Show program versionunfurl -r
orunfurl --respect
- Respect the tree structureunfurl <folder>
- Unfurl everything in given folder only- EG: unfurl asdf
Errors
Why does Destination path 'C:\Users\user\folder\asdf' already exists
occur when there is no file/folder with the same name?
Python does not see a difference between files and folders; therefore - it is impossible to move a file to a directory where a folder has the same name.