Re: Automated Folder Scripting Process
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 09:35:53 -0600
<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?
.
- Follow-Ups:
- Re: Automated Folder Scripting Process
- From: McKirahan
- Re: Automated Folder Scripting Process
- References:
- Automated Folder Scripting Process
- From: desmond . mcalister
- Automated Folder Scripting Process
- Prev by Date: Re: File Size Check
- Next by Date: Re: Automated Folder Scripting Process
- Previous by thread: Automated Folder Scripting Process
- Next by thread: Re: Automated Folder Scripting Process
- Index(es):
Relevant Pages
|