Find out which files are used (referenced) by other files through fuzzy content analysis, with the free sfk reflist command for the Windows, Mac OS X, Linux command shell.
sfk reflist [-path] [-wide] -dir sdir -file .text -dir tdir -file .sextsfk reflist -dir sourcedir -dir targetdir1 [targetdir2 targetdir3] [...]
list possible dependencies between files through (fuzzy) content analysis.
find out which target files are referenced by any of the source files.
a list of target files is created from directory targdir. then all source
files are loaded from srcdir, and scanned if the names of the targets appear
within their content. if so, the targets are listed, with the number of
referring source files, and a list (of the first 10) of these files.
NOTE that sfk reflist DOES NOT GUARANTEE that files are (not) referenced.
This way of reference detection is just a FUZZY INDICATOR, so keep thinking
and make backups before you massively cleanup files without references!
NOTE: you may specify any number of target directories. if your list of
target directories is incomplete, files from there will NOT be found.
by default, only relative target filenames are searched, without path,
but including the file name extension.
e.g. the target file: the/path/foosys.dll
runs a search for: foosys.dll
in the source files.
options
-path search target filenames including path information.
e.g. the target file: the/path/foosys.dll
runs a search for: the/path/foosys.dll
-noext strip .extensions from filenames, compare only basename.
e.g. the target file: the/path/foosys.dll
runs a search for: foosys
which may lead to ambiguities, listing too many hits.
-noext can also be combined with -path.
-wide[=n] list references in an extended format, with a list of
(up to to n) source files per target file, telling in
detail which text patterns were found.
-case force case sensitive string comparison (not default).
-quiet do not print the number of source and target files.
-relnames if using -path, strip targdir name from target paths
for comparison.
-flat do not check if target files depend on other target files.
set this to improve speed, if you know that such
dependencies cannot exist, e.g. if the targets are .wav files.
-memlimit=n load and analyze only files with a size up to n mbytes.
the default load limit is 300 mbytes.
see alsosfk deplist list file dependencies.
web referencehttp://stahlworks.com/sfk-reflistexamplessfk reflist -dir mysrcdir mytargdir
check every file in mytargdir if it is referenced
by any file within mysrcdir.
sfk reflist -dir movie -file .ppt -dir pic -file .png
find out which .png files within pic are referenced
by .ppt files within movie.
sfk reflist -wide=100 -dir bin -file .exe -dir bin -file .dll
find out which .dlls are directly referenced by .exe files
within directory bin, listing up to 100 references per target.
sfk reflist -dir . -file .flp -dir . -file .wav
within a FruityLoops project directory lists which .wav files
are referenced by which .flp project files of that directory.
sfk reflist -dir film -file .ppj -dir audio frames clips
tell which audio, image and movie clip files (e.g. .wav .bmp .avi)
are used by which Adobe Premiere project files (.ppj) within the
film directory. if image sequences are used, only the first image
of such sequences will be found, e.g. foobar00001.bmp