Page 2 of 2

Re: Flat View Sample?

Posted: 31 Jan 2012 02:09
by nas8e9
Zardoz2293 wrote:I'm not have success with the:

Code: Select all

setting SortFoldersApart, 0;
That's odd; if you want to take this further, could you post more of your code so Don and the scripting guys can look at it?
Zardoz2293 wrote:However, the problem is, I need all the files processed in each folder before the folder containing those files are renamed. The current order of the files/folders works only if you approach processing from the end -->start of the result set. However, the foreach only processes from from the start-->end. Using a "while" is not as elegant and risk free as a foreach. I don't see that PHP reverse array elements and I don't want to perform a scripted reverse of the string array to be able to use the foreach. Therefore the inferior while will have to be used, unless there is a superior alternative I'm not aware of.

What are your thoughts?
I'm hoping a pragmatic yet safe, way would be to start by defining a Branch View which only shows files, and renaming the files first. Afterwards, define a new Branch View showing only folders, and rename those. Would something like that work for you?

Re: Flat View Sample?

Posted: 31 Jan 2012 10:53
by Zardoz2293
nas8e9 wrote:I'm hoping a pragmatic yet safe, way would be to start by defining a Branch View which only shows files, and renaming the files first. Afterwards, define a new Branch View showing only folders, and rename those. Would something like that work for you?
Ha, ha, ha, Yes, you have a great mind. That is a superior method. I was hung-up on the scripting syntax. I already have it working with the while construct. However, a minute or two and I'll update it to your method.