Re: Automated Folder Scripting Process

Tech-Archive recommends: Speed Up your PC by fixing your registry



<desmond.mcalister@xxxxxxxxxxxxxx> wrote in message
news:ce87431e-aad0-49d8-b6aa-35609c74fdec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi

Hopefully someone can help. I need a script which will help me with
the following. I have a Root folder lets say for arguments sake is C:
\folder\

Then within here I have 2 sub folders lets say sub1 and sub2.

So overall I have a folder structure as follows: -

C:\folder\SUB1
C:\folder\SUB2

Within each of these sub folder are countless other sub folders and
below each sub folder (lets say R001) here we have 3 further sub
folders (lets say R001_XXX, R001_YYY, R001_ZZZ)

similarly we have the same under sub2

I need a script to automate the following

[snip and restated below]

It can certainly be done but a few questions first:

Given a partial structure like this:

C:\folder\
C:\folder\SUB1\
C:\folder\SUB1\R001\
C:\folder\SUB1\R001\R001_XXX\
C:\folder\SUB1\R001\R001_YYY\
C:\folder\SUB1\R001\R001_ZZZ\
...
C:\folder\SUB1\R010\R010_XXX\
C:\folder\SUB1\R010\R010_YYY\
C:\folder\SUB1\R010\R010_ZZZ\
C:\folder\SUB2
C:\folder\SUB2\R001\
C:\folder\SUB2\R001\R001_XXX\
C:\folder\SUB2\R001\R001_YYY\
C:\folder\SUB2\R001\R001_ZZZ\

and the instructions below (for SUB1);
you want to create these new subflders?

C:\folder\SUB1\R011\R011_XXX\
C:\folder\SUB1\R011\R011_YYY\
C:\folder\SUB1\R011\R011_ZZZ\



1) prompt the user which sub folder they want to create
a new folder in (either SUB1 or SUB2)

Only subfolders under the root folder?

2) Copy the latest folder within here
(so say we have R001 up to R0010 then here I would copy R0010)
within SUB1 or SUB2 folder depending on the choice made in step 1

Do you mean the highest numbered instead of "latest"?

3) Rename the new R0010 folder to the next number up - R0011
then rename the sub folders to R0011_XXX, R0011_YYY, R0011_ZZZ

Are there always and only those three subfolder suffixes?

4) finally I need to open some sort of text file (eg notepad)
with the names of the subfolders in it so that I can easily
copy and paste their names into an application.

Would the output of the command "dir C:\folder /ad/o" be okay?


Also, what are you really trying to do?
That is, what is the requirement behind this?



.



Relevant Pages

  • Re: Filesystemobject security IIS question...
    ... process identity as well -- so you can lock an application to an identity no ... IIS anon web sites run as IUSR user. ... Full - this folder, sub folders and files ...
    (microsoft.public.inetserver.iis.security)
  • Re: Filesystemobject security IIS question...
    ... If I Deny List Data / Read Data for IUSR in inetpub, ... Full - this folder, sub folders and files ...
    (microsoft.public.inetserver.iis.security)
  • Re: Update: Works in IMO but not CW?
    ... I have an older drive which contains WinFax 10.02 and Office ... The contact sub folders disappeared, ... I set each folder to "Show this folder as an e-mail Address Book" in the ... and Outlook 2000 is Linked in WinFax 10.02 ...
    (microsoft.public.outlook.fax)
  • Re: Missing files/folders
    ... The files/folders are located on a shared drive on a Small Business Server, Terminal Service is a separate server. ... Random files/folders are being moved and to random locations, somtimes a folder and 3 of its sub folders were moved but the remaining 6 subfolders were still in place! ...
    (microsoft.public.windows.terminal_services)
  • Re: Recursing Folders
    ... Do you know if the counters are accurate because the counters are only ... of the remote stuff is indexed. ... > You can right click on this folder in ciadv.msc and do a full rescan. ... >> in each of these folder I created sub folders and added documnets. ...
    (microsoft.public.inetserver.indexserver)