How can I make this file only out put 30 files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
galaxyprogramming
Posts: 1
Joined: 26 Oct 2011 16:41

How can I make this file only out put 30 files

#1 Post by galaxyprogramming » 26 Oct 2011 16:45

I have this batch file:

@echo off
:A
cd %current%
echo >%random%.%random%
goto A


Is it possible to limit the amount of files it outputs?

Acy Forsythe
Posts: 126
Joined: 10 Jun 2011 10:30

Re: How can I make this file only out put 30 files

#2 Post by Acy Forsythe » 28 Oct 2011 07:21

Put it in a FOR /L Loop like this:

Code: Select all

FOR /L %%a IN (1,1,30) DO (

Commands

)

Post Reply