Jump to content

Skapa flera nya undermappar på en gång?


Grooge
 Share

Recommended Posts

Ett enkelt VB-skript fixar tusentals mappar hur enkelt som helst.

Kolla nedan för ett exempel på ett skript som skapar 100 undermappar i mappen C:Bralla där varje mappnamn heter bralla1, bralla2 osv.

MVH. Finbom

strFolder = "C:BRALLA"	'Ange vilken mapp alla undermappar ska skapas i. Dom kommer heta denna mapps namn + löpnummer.
strAntalMappar = 100	'Ange hur många undermappar som ska skapas.

On Error Resume next
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CreateFolder (strFolder)
strfoldername = Right(strFolder,LEN(strfolder)-InStr(strfolder,""))

For Counter = 1 to strAntalMappar
FSO.CreateFolder (strFolder & "" & strfoldername & Counter)
Next

WScript.Echo "Klart! " & Counter & " mappar är skapade i mappen " & strFolder

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...