Skip to content

Instantly share code, notes, and snippets.

@FacuM
Last active July 9, 2019 02:10
Show Gist options
  • Save FacuM/54be52d87ad4e610a493dc60483bdbc9 to your computer and use it in GitHub Desktop.
Save FacuM/54be52d87ad4e610a493dc60483bdbc9 to your computer and use it in GitHub Desktop.
Not working, missing delayed expansion support.
@echo off
rem COUNT
set c=0
rem FOLDER ID
set f=0
mkdir folder%f%
echo Copiando a folder%f%...
for %%i in (*) do (
if %%c LSS 400 (
rem COPY TO CURRENT FOLDER
copy %%i folder%f%\
rem INCREASE ITERATION COUNT
set /a c+=1
) else (
rem INCREASE FOLDER ID
set /a f+=1
rem ADD A NEW FOLDER
mkdir folder%f%
echo Copiando a folder%f%...
rem RESET ITERATION COUNT
set c=0
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment