I recently wrote a Java test class which uses the ListObjects to get the file structure of a perticular area in LiveLink we use for storing approved project document.
At the moment I use the following sudo code:
For all folders in level 1 do
Get ObjectID
For all folders in Folder with ObjectID do
Get ObjectID
For all folders in Folder with ObjectID do
Get number files in folder
End for
End For
End for
Structure:
Level1 - (Archive)
- Level2.1 (Classes of documents; requirements, design docs etc)
- Level3.1.1 - Folder for each project
- This is where a class of document for a project is stored
- Level3.1.2
- Level3.1.n
- Level2.2
- More Folders
- Level2.n
We are ISO certified hence the rigid structure, just wondering if there was a more efficient way of doing this instead of embedding the for loops, at the moment it takes a VERY long time ( we are talking a minute +.
For instance can you use GListObjects() but specify how deep you want the results to be returned, i.e 4 iterations deep.
Projects and document classes are being added all the time and so I cant just miss out the first four for loops.
Anyhelp would be great!
At the moment I use the following sudo code:
For all folders in level 1 do
Get ObjectID
For all folders in Folder with ObjectID do
Get ObjectID
For all folders in Folder with ObjectID do
Get number files in folder
End for
End For
End for
Structure:
Level1 - (Archive)
- Level2.1 (Classes of documents; requirements, design docs etc)
- Level3.1.1 - Folder for each project
- This is where a class of document for a project is stored
- Level3.1.2
- Level3.1.n
- Level2.2
- More Folders
- Level2.n
We are ISO certified hence the rigid structure, just wondering if there was a more efficient way of doing this instead of embedding the for loops, at the moment it takes a VERY long time ( we are talking a minute +.
For instance can you use GListObjects() but specify how deep you want the results to be returned, i.e 4 iterations deep.
Projects and document classes are being added all the time and so I cant just miss out the first four for loops.
Anyhelp would be great!