Added the inverse operation, allowing for folder flattening.