|" am compositing the renders in Fusion and when I list the footage used I get a list like this: "|
my bad, i took this as meaning that Fusion generated a list into a file somewhere ("Fusion.txt").
Can the generator (Fusion) output the list of active footage to textfile? If so, that is the source of the file "fusion.txt".
It doesn't matter where you put the batchfile or the fusion.txt file, as long as the you can find the batchfile and the batchfile can find fusion.txt and the root directory "OUTPUT".
f/e, using just the simple root of c for both bat and listfile:
dir /ad \\externalDrive\projects\ThisProject\Sequence1\Shot05\OUTPUT > mpath\alldirs
findstr /v /g:mpath\fusion.txt alldirs>mpath\deldirs
for /f %%a in mpath\deldirs do echo deltree /y %%a
I know it should work, its just a matter of ironing out the details.
i oversimplified things i think, i'm editing to try and correct my oversight:
mpath is any dirpath you want to use for working, it could be OUTPUT or some other.
here's a simplified sample of the structure:
(where E stands for \\ExternalDrive)
this is the output from your active footage list...
first it needs the filename stripped off:
for /f %%a in (fusion.txt) do >>mpath\work1.txt echo %%~dpa
work1 is then used as the key of which subdirs to retain vs which
to remove, and should look likt this:
dir /b /s /ad \\E\proj\Th\OUTPUT >> mpath\alldirs.txt
this gives a list of ALL the subdirs under OUTPUT, like:
now everything that's in work1 can be "inverse-matched" against
work1 to give list of ones to delete:
findstr /v /g:mpath\work1.txt alldirs>mpath\deldirs
and deldirs should look like:
for /f %%a in (deldirs) do echo deltree /y %%a
but note that subdirs off legit. dirs, and emptied main subdirectories, will stll be dangling (ie not deleted):
since deltree is not native to XP (at least it's not on my machine, i had to
port it from winME), another option is to use attrib tagging combined with the del /s,
but that gets more complicated and since you have deltree i won't go into