On Sunday, Jan 26, 2003, at 08:33 Australia/Sydney, [EMAIL PROTECTED] wrote:
I'm very new to rev. I need to make an application that will divide up folders full of images into separate folders containing no more that 690 MB so they can be burned onto cds. Can rev do this? where should I start? any help will be much appreciatedJon
Jon
Look up "files" in the Transcript Dictionary and read about the "long" or "detailed" form of it. This gives you the size information on each image as well as the list of image file names. The rest is just standard bin-packing. Sort the file list in descending order by size (look up how to sort lines by an item) and fit the largest item into the smallest space currently available for it. Since you do not know how many CDs you will need, create two arrays. In one you keep the lists of file names as they are allocated, and in the other (with the same index) a convenient summary of how much space remains available in the corresponding CDs. Finally, create a sub-folder for each array entry and copy or move the corresponding files to those locations.
If this is not enough to get you going then feel free to write back. I have assumed that you will want to use the opportunity to learn about Rev and there are quite a few things you will be exploring and exercising here. I suggest a small test stack in which you successively explore the behaviour of each of the main commands (file access, arrays, sorting, looping, file moving) as you build your main application.
regards
David
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
