Swiss File Knife
a command line
free external tools,
- download the free Swiss File Knife Base from Sourceforge. - open the Windows CMD command line, Mac OS X Terminal or Linux shell. - OS X : type mv sfk-mac-64.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux-64.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk deplist [-flat] -dir srcdir [-file ...] -dir targdir [-file ...] sfk deplist [-flat] singleSourceFile -dir targdir [tdir2 tdir3] [-file ...] list possible dependencies between files through (fuzzy) string analysis. find out on which target files the specified source files depend. 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 sources are listed with their dependencies. by default, deplist also checks which targdir files depend on other targdir files (recursive dependencies), resulting in more complete listings. specify -flat to disable recursive checks. if you specify just a singleSourceFile name, the source name is NOT included in the output (unless -incsrc specified), and the filename list can be used by subsequent (chained) commands. 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. -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 also sfk reflist list file references. web reference http://stahlworks.com/sfk-deplist examples sfk deplist -dir bin -file .exe -dir lib1 lib2 lib3 -file .dll create a list of all .exe files in bin, and the dlls they depend on, searching for dlls in lib1, lib2 and lib3 directories. sfk deplist bin\diff.exe -dir bin -file .dll +run "copy $file tmp" find out which .dlls are used by diff.exe, and copy them to tmp. sfk deplist -relnames -case -path -noext -dir classes -dir classes find dependencies between java .class files. -path uses path infos, -noext strips ".class", -case keeps the capital letters within names. -relnames strips "classes/" from target names for comparison. sfk deplist -flat -dir . -file .flp -dir . -file .wav within a FruityLoops project directory lists which .flp project files are using which .wav files of that directory. note that .wav files cannot "use" other .wav files, therefore -flat was set to avoid recursive target checks, speeding up the search.
sfk is a free open-source tool, running instantly without installation efforts. no DLL's,
no registry changes - just get sfk.exe from the zip package and use it (binaries for
windows, linux and mac are included).
read more about all sfk functions here.