6 Replies - 1526 Views - Last Post: 11 December 2016 - 01:36 PM Rate Topic: -----

#1 Javaman   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 45
  • Joined: 17-December 07

Batch File Help

Post icon  Posted 07 January 2009 - 08:49 PM

I am trying to create a batch file that will create infinite amounts of folders in the directory in which the program is placed as long as the file is open. I am not too familiar with batch files and the only part of it I know is mkdir creates a folder. So far I have mkdir x:\%random%. To my understanding, that will create a folder with a random number for a name. I am not familiar with how to loop with a batch file. Can anyone help me write this?

Is This A Good Question/Topic? 0
  • +

Replies To: Batch File Help

#2 bsaunders   User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 571
  • Joined: 18-January 09

Re: Batch File Help

Posted 19 January 2009 - 06:25 PM

This might work:

@echo off
cls

set foldernumber=1

:createanotherfolder

mkdir .\folder%foldernumber%

set /a foldernumber+=1

goto createanotherfolder

Was This Post Helpful? 0
  • +
  • -

#3 beuvlad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 25-January 09

Re: Batch File Help

Posted 25 January 2009 - 02:27 PM

This is cool! looks like a lil 'virus'.
It flooded my desktop!
Was This Post Helpful? 0
  • +
  • -

#4 ayman_mastermind   User is offline

  • human.setType("geek");
  • member icon

Reputation: 127
  • View blog
  • Posts: 1,860
  • Joined: 12-December 08

Re: Batch File Help

Posted 01 February 2009 - 01:44 AM

@Javaman, why are you interested in creating infinite number of folders in a directory? i dont see any usefulness in that...

This post has been edited by ayman_mastermind: 01 February 2009 - 01:45 AM

Was This Post Helpful? 0
  • +
  • -

#5 Auzzie   User is offline

  • D.I.C Addict
  • member icon

Reputation: 43
  • View blog
  • Posts: 573
  • Joined: 20-January 09

Re: Batch File Help

Posted 01 February 2009 - 04:18 AM

The only usefulness i see in it is a virii style attempt as it will freeze up a system
Was This Post Helpful? 0
  • +
  • -

#6 Morpheus212   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 05-December 16

Re: Batch File Help

Posted 11 December 2016 - 01:28 PM

Another way:

Random folders:
color 0a
:a
mkdir %random%
goto a



Random text files with random text inside

color 0a
:a
echo %random%%random%%random% >> %random%%random%.txt
goto a


Was This Post Helpful? 0
  • +
  • -

#7 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14425
  • View blog
  • Posts: 57,820
  • Joined: 12-June 08

Re: Batch File Help

Posted 11 December 2016 - 01:36 PM

Be mindful the last post was from seven years ago.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1