Empty Subfolders

This might have been asked but I have a project where I take two file locations

Location A is a subset of Location B so I have to take away locations A files.

There are two ways to accomplish this.  One i suse the file iterate and check to see if location "b"'s file exisit in location "a".  If it does not exisit then I can copy it to location C from my build process.  This i use the Path manupulation to strip the path of and name off so when I copy the file to location C I can maintain the additional paths that are used with the files.  I use Robocopy to perform the copy after geting the path  taken away.

Example

Location A   - \\ServerLoc\Share\MainData\*.*  - Recursive from here

Location B - \\ServerLoc\Share\SecondaryData\*.*  - Recursive from here

Location C - Localdrive\path\..\file startlocation

So when I end up I get Location "C" with the recursive path to the files that only reside in Location B.  This is taking a very long time to run checking over 3000 files.

The other option is copy Location B down to location C then stip away the files that location has in location C.  This is very quick but leaves behind a massive amount of empty directories.  I can write vbscript code to remove empty directories and empty subdirectories with file count of 0 and subfolder count of 0.  But I was looking how do I do this with the internal functions within finalbuilder?

 

 

 

I found a work around that works. 

Copy location A down to location C temp location. 

Take the files iterate from location B and string replace it with location C root path. 

Then delete the files if they exist.  - "This takes the longest time." 

I do a FileSet Derfine to location C getttng all the files. 

Move the fileset to the real location of C. 

Delete the temp location.  

 

This all take about 9 minutes to work.  The other way I stated with uising iterates from file A to B and only copying the difference to location C took too long to execute.

Dennis

Hi Dennis,

I’m glad you found a workaround. I have some ideas for actions which should make this kind of thing easy to do, so I’ve added them to the to-do list… but we’re pretty busy, so it may be a while before they see the light of day. :-).

Regards,

Angus

The work around is okay but my scripted project took less time 15 minutes to using finalbuilder is now to 45 minutes!  I will see if I can find another solution with the check file after the influx of items here have settled down.