@echo off set /a nbFichiers=0 for %%a in (*.*) do set /a nbFichiers+=1 echo %nbFichiers%
this will count the number of files (excluding directories) in the current directory. Be careful not to double the % in the for when you're live (!= batch though ^^) and the @echo off has nothing to do with it, it's there to prevent returns. See you soon.
If it's as basic as you say, then provide the answer. If we reasoned as basically as you do, there wouldn't be a forum since everything we do has already been done by someone. You are approximating Mr. Ronfanfa. Thanks anyway.