Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need to create 75 folders

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,34010
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need to create 75 folders
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need to create 75 folders - 4/27/2006 2:01:10 AM   
  abuthemagician

 

Posts: 4
Score: 0
Joined: 9/20/2004
From:
Status: offline
I need a simple script that will create 75 folders named 001 to 075. I am very rusty and can't figure it out. I know it needs something like:

While x != 075
dim X = 001
create folder named x
X++

or something like that. Thanks in advance!
 
 
Post #: 1
 
 RE: Need to create 75 folders - 4/27/2006 2:04:04 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
Set oFSO = CreateObject("Scripting.FilesyatemObject")
For i = 0 To 75
   oFSO.CreateFolder "C:\Temp\" & Right("000" & i, 3)
Next

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to abuthemagician)
 
 
Post #: 2
 
 RE: Need to create 75 folders - 4/27/2006 2:06:04 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
Or if you don't need the 00s in the folder names, just type this at a command line:

For /L %i IN (1,1,5) DO MkDir C:\Temp\%i

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Need to create 75 folders - 4/27/2006 2:07:11 AM   
  abuthemagician

 

Posts: 4
Score: 0
Joined: 9/20/2004
From:
Status: offline
you just saved me an hour.

(in reply to ebgreen)
 
 
Post #: 4
 
 RE: Need to create 75 folders - 4/27/2006 2:19:29 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
Aah...come on...you could have made 75 folders by hand in less than an hour. 

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to abuthemagician)
 
 
Post #: 5
 
 RE: Need to create 75 folders - 4/27/2006 2:22:08 AM   
  abuthemagician

 

Posts: 4
Score: 0
Joined: 9/20/2004
From:
Status: offline
now i have to move all the files into the folders, then edit an mdb to relect their new location... crappy scanning software dumps all the files to one location in an archive and my burning software can't handle it.

(in reply to ebgreen)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need to create 75 folders Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts