^ Flat View Sample?

Discuss and share scripts and script files...
nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Flat View Sample?

Post 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?

Zardoz2293
Posts: 594
Joined: 09 Nov 2011 20:20
Location: USA

Re: Flat View Sample?

Post 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.
:off:MacOS Tahoe v26.1 | Windows 11 Pro v25H2.26200.7309 >> Scaling VMs: 2056x1285 @100%; 4112x2658 @400%

Post Reply