Created
February 25, 2023 13:05
-
-
Save retorillo/3c9393d6090006166f9505e1ed6278f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$shell = new-object -comobject shell.application | |
$folder = $shell.namespace($pwd.path) | |
dir | foreach { | |
$file = $folder.parseName($_.name) | |
$size = $folder.getDetailsOf($file, 31) | |
if ($size -eq "") { continue } | |
if (-not(test-path $size)) { mkdir $size } | |
move $_.name $size | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment