Once a year, I need to create a folder with a specific number for an internal corporate file structure on OS X (based on product numbering that goes back several years and I have no control over - grrr). Inside a new master folder, I need to create hundreds of nested numbered folders, each folder inheriting a new linear number (based on 1's or 10's usually)but based on its parent's number. I used to create these folders manually (yawn). Time to use Automator for this.
Any ideas on the logic involved in making them? I have the general pieces complete (dialogs that explain the tool and how it works,etc). I don't see any "pre-fab" way to build the "meaty" logic for the incremental folder building, so I will need to hand-code the actual AppleScript part I assume.
Examples:
Phase 1 = "Shallow" skeleton folders with increments of 10 in the folder name. Example:
1) Create "master" root folder named APC0015000
2) Inside the "master" folder, create 10 folders, each 1 level deep with the same name/number as the master folder +10 (i.e.; APC0015010, APC0015020, APC0015030...APC0015090, etc)
Phase 2 = "Deeper" folders with granualar increments of +1 instead of 10 this time. Example:
1) Inside the APC0015010 folder create 9 folders in increments of 1 like this APC0015011, APC0015012, APC0015013...APC0015019, etc)
2) Inside the APC0015020 folder create 9 folders in increments of 1 like this APC0015021, APC0015022, APC0015023...APC0015029 etc)
At the end of this project, I should have 1 master folder with 10 sub-folders (0-9), and each sub-folder contains 10 more folders (ranging from 0 to 9). Thus the folder heairachy looks like this:
APC0015000/
APC0015010/APC0015011/APC0015012...
APC0015020/APC0015021/APC0015022...
...
APC0015090/APC0015091/APC0015092...
I dont need to fill the 100's postion yet, just the 10's and 1's thus far... I might need to modify the code sometime to do a wider/deeper folder structure.
Thanks
Any ideas on the logic involved in making them? I have the general pieces complete (dialogs that explain the tool and how it works,etc). I don't see any "pre-fab" way to build the "meaty" logic for the incremental folder building, so I will need to hand-code the actual AppleScript part I assume.
Examples:
Phase 1 = "Shallow" skeleton folders with increments of 10 in the folder name. Example:
1) Create "master" root folder named APC0015000
2) Inside the "master" folder, create 10 folders, each 1 level deep with the same name/number as the master folder +10 (i.e.; APC0015010, APC0015020, APC0015030...APC0015090, etc)
Phase 2 = "Deeper" folders with granualar increments of +1 instead of 10 this time. Example:
1) Inside the APC0015010 folder create 9 folders in increments of 1 like this APC0015011, APC0015012, APC0015013...APC0015019, etc)
2) Inside the APC0015020 folder create 9 folders in increments of 1 like this APC0015021, APC0015022, APC0015023...APC0015029 etc)
At the end of this project, I should have 1 master folder with 10 sub-folders (0-9), and each sub-folder contains 10 more folders (ranging from 0 to 9). Thus the folder heairachy looks like this:
APC0015000/
APC0015010/APC0015011/APC0015012...
APC0015020/APC0015021/APC0015022...
...
APC0015090/APC0015091/APC0015092...
I dont need to fill the 100's postion yet, just the 10's and 1's thus far... I might need to modify the code sometime to do a wider/deeper folder structure.
Thanks
A friend will help you move, but a REAL FRIEND will help you move a body.
A friend will help you move, but a REAL FRIEND will help you move a body.





