Problem with counting files

March 26, 2009 at 01:53:38
Specs: W2k3

can someone help me with this problem?

I'm would count the files in a folder and i want to move the first 8 files to an other folder. I can move the files but it doesn't stop because it doesn't count.

this is the code:

set var=0

cd %Temp%\%%x\

For %%I in (*) do (
IF %var% LSS 8 (
Set /a var=%var%+1 /// this doesn't work, it will not count
echo %var%
xcopy "%%I" Folder\

See More: Problem with counting files

Report •

March 26, 2009 at 03:39:05
"the first 8 files"

as defined by what?

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question