divide sets of file

May 24, 2010 at 10:51:07
Specs: Windows XP

CAn you help me create batch file to divide a set of files into 500 and move it to folder. I need this to zip every 500 files.

Thanks for your help

See More: divide sets of file

Report •

May 24, 2010 at 12:50:34
@echo off & setLocal EnableDELAYedeXpansion

pushd c:\files
set N=
for /f "tokens=* delims= " %%a in ('dir/b') do (
set /a N+=1
if !N! leq 500 (
echo move %%a d:\dest

Report •

May 24, 2010 at 14:41:37
Thanks it worked fine but I changed set /a N+=1
set /a N=!N! + 1

Thanks a lot

Report •

Related Solutions

Ask Question