Re: Making folders....

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • RE: Disappearing Network Share Subfolders
    ... Thank you for posting to the SBS Newsgroup. ... I understand that some of your Windows XP SP2 clients cannot view the ... subfolders in share folders on SBS 2K Server. ... Does the problematic share folder locate at NTFS or FAT32 disk? ...
    (microsoft.public.windows.server.sbs)
  • Re: Making folders....
    ... Thanks Torgeir, this was exactly what I was asking for, but not ... I have this folder structure where the folders are named after ... I want to create subfolders into these, ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsxp.general)
  • Re: Read path from text file to process directory structure
    ... Public Function fGetFolder(sFolderName As String) ... Dim FoldersArray As Variant ... 'Read all subfolders of the specified folder into an array ... 'The following string will contain the path of the folder which is currently ...
    (microsoft.public.word.vba.general)
  • Re: NTFS Permissions Question
    ... Answer is, modify includes delete, but not delete subfolders and files. ... subfolder(s) when delete is not inherited from the parent folder. ... with just the permission you need. ...
    (microsoft.public.cert.exam.mcse)
  • File Server NTFS Permissions question
    ... have 3 subfolders that are not shares, ... Share permissions to the 'Shares' share are: ... Users will see a list of department folders when browsing to the K:\. ... Folder / Execute File | List Folder / Read Data ...
    (microsoft.public.windows.server.active_directory)