Skip to content

Instantly share code, notes, and snippets.

@olegwtf
Created April 17, 2012 17:38
Show Gist options
  • Save olegwtf/2407695 to your computer and use it in GitHub Desktop.
Save olegwtf/2407695 to your computer and use it in GitHub Desktop.
Perl Golf
$i++%50||++$j&mkdir($f="folder$j")&($i=1),rename$_,"$f/$i"for<*>
@olegwtf
Copy link
Author

olegwtf commented Apr 17, 2012

Moves files from the current directory to subdirectories. No more than 50 to one directory. New name should be digit, from 1 to ... for each subdirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment