ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

Create Multiple Empty Numbered Folders

<< < (2/3) > >>

aCkRiTe:
Heres a way with AHK. Just run the script from the directory or location you want the folders to be created.


--- ---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.


--- ---for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"

CleverCat:
have 1.bat go from 0 to 15
-housetier (January 09, 2009, 08:15 AM)
--- End quote ---

That makes 250 with some folders having 4 digits?

CleverCat:
Heres a way with AHK. Just run the script from the directory or location you want the folders to be created.


--- ---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.


--- ---for /l %%i in (1,1,150) do mkdir "C:\Test\%%i"-aCkRiTe (January 09, 2009, 09:29 AM)
--- End quote ---

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

aCkRiTe:

--- ---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:
Awesome - works a treat!

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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version