Welcome Guest.   Make a donation to an author on the site September 22, 2014, 01:13:26 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Create Multiple Empty Numbered Folders  (Read 8445 times)
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« on: January 09, 2009, 04:04:01 AM »

Is there any way to create about 150 numbered folders quickly?

Thanks..... tellme
Logged

If you need help - JUST ASK!
rjbull
Charter Member
***
Posts: 2,758

View Profile Give some DonationCredits to this forum member
« Reply #1 on: January 09, 2009, 04:27:40 AM »

Here's a quick way of making 100:

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

$2.bat:
[copy or print]
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.




Logged
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: January 09, 2009, 05:41:24 AM »

Thanks a million.... Thmbsup
Logged

If you need help - JUST ASK!
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: January 09, 2009, 06:05:20 AM »

Works great - thanks! So if I need say 150?
Logged

If you need help - JUST ASK!
housetier
Charter Honorary Member
***
Posts: 1,321


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: January 09, 2009, 08:15:37 AM »

have 1.bat go from 0 to 15
Logged
aCkRiTe
Honorary Member
**
Posts: 21

View Profile Give some DonationCredits to this forum member
« 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.

[copy or print]
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.

[copy or print]
for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"
« Last Edit: January 09, 2009, 09:45:11 AM by aCkRiTe » Logged
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« 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?
Logged

If you need help - JUST ASK!
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« 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.

[copy or print]
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.

[copy or print]
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?
Logged

If you need help - JUST ASK!
aCkRiTe
Honorary Member
**
Posts: 21

View Profile Give some DonationCredits to this forum member
« Reply #8 on: January 10, 2009, 02:23:57 AM »

[copy or print]
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
Logged
CleverCat
Supporting Member
**
Posts: 1,126


Cat's Are Fun!

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #9 on: January 10, 2009, 06:14:05 AM »

Awesome - works a treat!

A big thanks to all for the input!  Thmbsup


* ty-cat02.jpg (16.09 KB, 175x195 - viewed 344 times.)
Logged

If you need help - JUST ASK!
by66
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #10 on: February 03, 2009, 11:58:34 PM »

Try this program, very powerfull
Flexible renamer

 Grin
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.033s | Server load: 0.24 ]