Click to See Complete Forum and Search --> : Any Ideas???


softweng
July 2nd, 2001, 02:13 PM
I have to write an app that will look at all the folders in a certain location. It needs to group
them in blocks of 620mb. If a folder is bigger than 620mb it needs to split them up. This will
be for archiving data on our servers. The IS dept. creates CD's with the data but they need
the data broken up into 620mb blocks. This is done manually right now and takes a very long time.
I would like to read the data and create folders like "CD1" that contains a block of data that is
approx 620mb. I need to do this for the whole drive.
Does anyone have any ideas on how to accomplish this? Any source code?
Any help is greatly appreciated!!!!!

Kris
Software Engineer
Phoenix,AZ

John G Duffy
July 3rd, 2001, 10:19 AM
I have a backup program that tries to cram as much stuff on a Disc as possible without running over. This Program works something like this
1). Scan a folder saving both filename and File size of each file encountered in a two dimensional array.
2). When finished sort the array by filesize.
3). Look at space remaining on output media.
4). Find the largest file that will fit in the space left by scanning the array top to bottom
5). Copy that file to the output media.
6). When you can not find a file that will fit in the space left, start a new media and go back to step 3.
7). When finished with currentfolder go back to step 1.

You could of course use this technique and sort the entire span of folders into one big array and then proceed to copy the files, creating multiple 650MB files or whatever.

John G

softweng
July 3rd, 2001, 10:32 AM
Thanks for the reply. Do happen to have any source code on doing this?

Kris
Software Engineer
Phoenix,AZ

John G Duffy
July 4th, 2001, 07:26 AM
I have all the source code to do this. Send me a private mail with your Email address and I will .ZIP you a copy

John G

softweng
July 5th, 2001, 11:21 AM
You have a private message.

Kris
Software Engineer
Phoenix,AZ