Re: Making folders....
- From: "Zadig Galbaras" <tresfjording@xxxxxxxxx>
- Date: Sun, 17 Jul 2005 20:52:08 +0200
Hi Torgeir!
(Zadig er et nick da vettu. Har "ø" i navnet mitt, og brukt dette nicket
siden rundt den tiden første romferga ekploderte)
Thanks Torgeir, this was exactly what I was asking for, but not what I
needed :-)
My mistake...
I have this folder structure where the folders are named after every country
on the planet.
I want to create subfolders into these, i.e. into all subfolders under a
certain folder.
I want to create maybe as many as five or more subfolders in every
subfolders in the folder tree.
So a software which looks for subfolders of any name, and then, if any found
create subfolders in it according to a list would do the trick.
And of course if the named subfolder exist, continue without creating a new
one.
If you catch my drift....
Anyone know about a program which can do this job without me having to
retype close to two hundred folders with maybe as many as ten subfolders?
--
regards
Zadig Galbaras
A Perturbed Norwegian Agnostic
-
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@xxxxxxxxx> skrev i melding
news:uqKgzZviFHA.3316@xxxxxxxxxxxxxxxxxxxxxxx
> Zadig Galbaras wrote:
>
>> Is there a software designed to make a set of subfolders
>> in a tree of folder?
>>
>> I mean, I have f eks ten folders named 1 through 10.
>> Under each there is many subfolders named A through Z
>>
>> Is there a snappy way to make a set of subfolders to each
>> of these 260 folders?
>>
>
> Hei Zadig (ikke akkurat et standard norsk navn må jeg si :-)
>
> You can use a VBScript for this. Put the script below in a file with
> a .vbs extension, and run it by double clicking on it.
>
> You need to adjust the data in the two variables sBaseFolder and
> aNewFolders .
>
>
> '--------------------8<----------------------
> ' Script that will populate a folder structure with a set
> ' of new folders
> '
>
>
> ' Define the base folder path
> ' (the one containing the folders named 1 through 10)
> sBaseFolder = "C:\some1\some2"
>
> ' list all new folders to be created here
> aNewFolders = Array("new1", "new2", "new3")
>
> Set oFSO = CreateObject("Scripting.FileSystemObject")
>
> On Error Resume Next
> For i = 1 To 10
> For n = Asc("A") To Asc("Z")
> sFolder = sBaseFolder & "\" & i & "\" & Chr(n)
> If oFSO.FolderExists(sFolder) Then
> For Each sNewFolder In aNewFolders
> oFSO.CreateFolder sFolder & "\" & sNewFolder
> Next
> End If
> Next
> Next
>
> MsgBox "Finished!", vbInformation + vbSystemModal, "Populate folders"
>
> '--------------------8<----------------------
>
>
>
> WSH 5.6 documentation (local help file) can be downloaded from here
> if you haven't got it already:
> http://msdn.microsoft.com/downloads/list/webdev.asp
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
.
- Follow-Ups:
- Re: Making folders....
- From: Torgeir Bakken \(MVP\)
- Re: Making folders....
- References:
- Making folders....
- From: Zadig Galbaras
- Re: Making folders....
- From: Torgeir Bakken \(MVP\)
- Making folders....
- Prev by Date: Re: Post Crash
- Next by Date: Re: Windows Updates
- Previous by thread: Re: Making folders....
- Next by thread: Re: Making folders....
- Index(es):
Relevant Pages
|