- The script will treat any folder with a period in it's name as a bundle.
- It will not individually checksum, compare, rename, or move any file within a bundle.
- It will checksum, compare, rename and move the whole bundle as one item.
So if you run the script on a single folder named "Australia 2.5M Test", not much happens because the entire source folder is treated as a bundle (and thus a duplicate PDF within that folder is never compared to a single-file PDF outside that folder.) Since there is no other item to compare with the one source folder bundle, nothing is moved, renamed etc. Basically nothing happens.
I created a test folder named "JJJExampleFolder" with two subfolders into each of which I copied two of your mapping folders as examples.
-->"The files in these folders will be moved to the top level"
(contains "Alick Creek" and "Beames Brook" folders)
and
-->"These folders will be moved to the top level intact"
(contains "Albert River 2.5M" and "Alice River 2.5M" folders.)
A 'before' picture of the folder may be viewed at the following URL:
http://img571.imageshack.us/img571/6950/beforeg.png
An 'after' picture of the folder may be viewed at the following URL:
http://img532.imageshack.us/img532/3712/afterp.png
What happened in between was that when run, the script first looked for individual files while ignoring any folders which had periods within their filename... so the "Albert River 2.5M" and "Alice River 2.5M" folders were ignored during the finding of individual files. The files within the "Alick Creek" and "Beames Brook" folders were found and individually checksummed, then added to the list of items to process as individual files.
Next, the script looked for bundles/packages and found the "Albert River 2.5M" and "Alice River 2.5M" folders because they are folders with a period in their names. The script then generated a checksum for the entire content of each folder (instead of for it's individual files) and added each folder and it's total checksum to the list of items to process.
Here is the output from the 'consolidate12' run for this example folder:
./consolidate11.command /testpix/JJJExampleFolder/
Consolidate12 script revised 2010-05-24 8:00 P.M.
--> Finding files and ignoring any folder whose name contains a period and it's content (potential packages).
Elapsed time in seconds since start of script: 0
--> Generating list of MD5 checksums for file content.
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.dbf e7eac6212bbddbb6d529362f89cce800
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.prj e729936bf5360b37a15365fc295a1901
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shp acfee71e413e11896505f23ebc069947
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shx 4742fa4533022e192c40ab85e26ba8f4
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.dbf ab24e4770eaebf7fbc66f7066726ee17
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.prj e729936bf5360b37a15365fc295a1901
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shp e8a455ba8d8b5241f21b4d4ab98e2048
/testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shx 477dfdd0e54ec53a4f8ba5c24152688e
Elapsed time in seconds since start of script: 1
--> Finding potential packages/bundles.
Elapsed time in seconds since start of script: 1
--> Generating list of MD5 checksums for potential packages/bundles.
/testpix/JJJExampleFolder//These folders will be moved to the top level intact/Albert River 2.5M 7237ff1ed62224b18d5392356dfa9b05
/testpix/JJJExampleFolder//These folders will be moved to the top level intact/Alice River 2.5M 23f78fe58cc832dababaa6b894287e71
Elapsed time in seconds since start of script: 2
--> Sorting list of files and potential bundles by checksum.
Elapsed time in seconds since start of script: 2
Checking checksum for: /testpix/JJJExampleFolder//These folders will be moved to the top level intact/Alice River 2.5M
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shx
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shx
Checking checksum for: /testpix/JJJExampleFolder//These folders will be moved to the top level intact/Albert River 2.5M
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.dbf
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shp
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.prj
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.dbf
Checking checksum for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shp
Elapsed time in seconds since start of script: 2
--> Sorting list of names.
Checking name for: /testpix/JJJExampleFolder//These folders will be moved to the top level intact/Albert River 2.5M
Checking name for: /testpix/JJJExampleFolder//These folders will be moved to the top level intact/Alice River 2.5M
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.dbf
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.prj
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shp
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Alick Creek/Alick Creek.shx
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.dbf
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shp
Checking name for: /testpix/JJJExampleFolder//The files in these folders will be moved to the top level/Beames Brook/Beames Brook 2.5M.shx
Elapsed time in seconds since start of script: 3
--> Finding possible packages/bundles and moving them to the top-level.
--> Finding files and moving them to the top-level.
--> Deleting .DS_Store files from subfolders.
--> Deleting empty subfolders.
--> Sorting index file.
DONE.
NOTE: Unknown packages, invisible files, and files with unresolved name conflicts may be left within any remaining subfolders!
Elapsed time in seconds since start of script: 3
So, the mapping project folders which had "2.5M" in their folder names were treated as a bundle. Those which did not have a period in the folder name were dealt with as a subfolder of individual files.
As you can see from the 'after' picture, those files that were dealt with individually were moved up to the top-level but they are still together by name, with all the parts together in the same folder and should still function with the mapping software. They just look less organized.
The two "bundles" were also moved up to the top level as bundles, which is probably what you would want to have happen?
We have several choices:
1] Rely on the user to ensure that all mapping project folder names contain a period.
2] Before other operations, the script could first look for the presence of .shp files within folders which do NOT have 2.5M in their name and when found, determine if all files in that file's folder have the same root name (as in Alick Creek.dbf, Alick Creek.prj, Alick Creek.shp and Alick Creek.shx.) If so, the script can rename the folder by appending "2.5M". Then the rest of the function of the script will handle all the mapping project folders consistently as bundles.
3] At completion of the script, it could offer to find *.shp files in the top-level folder only (not in subfolders), create a new folder using the shp file name without the extension and with 2.5M added on and then move the files with the same name and any extension into that folder. For instance, when the script finds "Alick Creek.shp" in the top-level folder it could make a new folder "Alick Creek 2.5M" and move files "Alick Creek.*" (the asterisk is a wild-card to match anything) into the "Alick Creek 2.5M" folder. This would re-group the mapping project files into their own subfolders.
4] We could leave it as is since the mapping data should still be functional (all required parts are in the same folder - they just have a lot of company.)
What would be best for your situation?