Your question: How do I make 1000 folders, then automatically number them


Read 2575 times, 2 Antworten - 0 Members and 1 Guest are viewing this topic.

Your question: How do I make 1000 folders, then automatically number them



To solve annoying Windows errors, you might want to try a Windows Registry Check. In most cases, optimizing the Windows registry will speed up your Windows.


Auf Facebook, Twitter und Google Plus empfehlen
Windows help board & forum »

Your question: How do I make 1000 folders, then automatically number them

Pages: [1]
« »
Herunterladen

burgess.victor
Guest

Your question: How do I make 1000 folders, then automatically number them




I need to make 1000 folders named Victor 001 - Victor 1000. How do i do it using a macro?


nico
Administrator (7.348)  
*****
Re: Your question: How do I make 1000 folders, then automatically number them


With the VB macros in MS Office, you can create folders with a syntax like:

Code:
MkDir DirName


Because I don't know much about programming in VB, I hope the following links help you to insert the counting variable into the DirName:


http://exceltips.vitalnews.com/Pages/T002462_Creating_a_Directory_in_a_Macro.html
http://en.allexperts.com/q/Microsoft-Word-1058/Creating-new-folder-using-1.htm
http://www.pcreview.co.uk/forums/thread-956392.php
 


Lisaa
(4.123)  
*****
Re: Your question: How do I make 1000 folders, then automatically number them


Do you need a VB macro? A simple(1) command line script could do the trick as well:

FOR /L %%i IN (1,1,1000) DO (IF %%i LSS 10 (mkdir "Victor 000%%i") ELSE (IF %%i LSS 100 (mkdir "Victor 00%%i") ELSE (IF %%i LSS 1000 (mkdir "Victor 0%%i") ELSE mkdir "Victor %%i")))

Just copy & paste into a batch file (e.g. create.bat) and run it from the directory where the subdirectories should be created. Please note that this is actually just one line, so make sure the command is not truncated by a newline or so.

(1) OK, looks a bit complicated because it was quite tricky to get the leading zeroes.  
« Last Edit: 23.06.08, 15:29:29 by Lisaa »

Pages: [1]  


Windows 5 Windows 4 |




Computerhilfen.com | Powered by SMF 2.5.1.
© 2001-2012, Lewis Media. All Rights Reserved.

Sie betrachten das Thema Your question: How do I make 1000 folders, then automatically number them (burgess.victor) - Windows help board & forum © Computerhilfen.com