PDA

View Full Version : Calculate Dir tree size for DVD Burn


lherz
11-05-2007, 03:45 PM
I am sure that I am simply overlooking something obvious, but I am trying to archive some data to DVD and want to be able to traverse a folder structure and create a DVD archive of the data.

The tree has multiple folders, many with one or more sub folders.

I am trying to determine when to stop processing and burn the files to disc, then continue. I have tried simply storing the path to each file in a variable in a vbscript, then adding the var to a Macro that the burn step uses, but since there are many small files and many directories, the string gets too long.

I thought that there should be a simple way to traverse a folder tree, storing folder names as long as the total content of the folder list was less than a pre-defined size (DVD for example) and upon reaching a folder whose contents extend beyond that boundary, include only the files in that particular folder that will not exceed the boundary when added to the folders already in the list, but have not been able to find it.

Any assistanvce would be greatly appreciated.

kinook
11-05-2007, 05:45 PM
I can't think of a simple way to accomplish that. Maybe use a different type of archive media with larger capacity? Or possibly exclude files that don't need to be backed up. For instance, here's what we commonly exclude:

*.pdb
*.ncb
*.opt
*.clw
*.obj
*.pch
*.ilk
*.projdata
*.incr
*.idb
*.lib
*.exp
*.trg
*.aps
*.plg
*.scc
*.suo
/Debug
/Release
*.bak