Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 02, 2015, 11:32:41 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Create Multiple Empty Numbered Folders  (Read 9867 times)

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Create Multiple Empty Numbered Folders
« on: January 09, 2009, 04:04:01 AM »
Is there any way to create about 150 numbered folders quickly?

Thanks..... :tellme:

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,856
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #1 on: January 09, 2009, 04:27:40 AM »
Here's a quick way of making 100:

$1.bat:
Code: [Select]
for %%a in (0 1 2 3 4 5 6 7 8 9) do call $2.bat %%a

$2.bat:
Code: [Select]
for %%a in (0 1 2 3 4 5 6 7 8 9) do md %1%%a

Put them both in the same directory, and just run $1.bat.  Easy enough to generalise if you want more directories.





CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #2 on: January 09, 2009, 05:41:24 AM »
Thanks a million.... :Thmbsup:

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #3 on: January 09, 2009, 06:05:20 AM »
Works great - thanks! So if I need say 150?

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #4 on: January 09, 2009, 08:15:37 AM »
have 1.bat go from 0 to 15

aCkRiTe

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #5 on: January 09, 2009, 09:29:25 AM »
Heres a way with AHK. Just run the script from the directory or location you want the folders to be created.

Code: [Select]
Loop, 150
FileCreateDir, %A_Index%
ExitApp

If you want to use a batch file you can use this. Of course change the path as needed.

Code: [Select]
for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"
« Last Edit: January 09, 2009, 09:45:11 AM by aCkRiTe »

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #6 on: January 10, 2009, 12:51:19 AM »
have 1.bat go from 0 to 15

That makes 250 with some folders having 4 digits?

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #7 on: January 10, 2009, 01:00:11 AM »
Heres a way with AHK. Just run the script from the directory or location you want the folders to be created.

Code: [Select]
Loop, 150
FileCreateDir, %A_Index%
ExitApp

If you want to use a batch file you can use this. Of course change the path as needed.

Code: [Select]
for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"

How do I make each folder have 3 digits i.e, 001 etc. so Windows puts them in correct order?

aCkRiTe

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #8 on: January 10, 2009, 02:23:57 AM »
Code: [Select]
Loop, 150
{
StringLen, Length, A_Index
If Length = 1
FileCreateDir, 00%A_Index%
If Length = 2
FileCreateDir, 0%A_Index%
If Length = 3
FileCreateDir, %A_Index%
}
ExitApp

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,137
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #9 on: January 10, 2009, 06:14:05 AM »
Awesome - works a treat!

A big thanks to all for the input!  :Thmbsup:

by66

  • Participant
  • Joined in 2008
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Create Multiple Empty Numbered Folders
« Reply #10 on: February 03, 2009, 11:58:34 PM »
Try this program, very powerfull
Flexible renamer

 ;D