This program is to be used by experts, don't blame me if you delete some important .inc file
It works using the ecompile generated .dep file and checking if all the .inc files in the specified directories are all used by that .dep files.
The correct steps for spotting unused files are:
- place in a folder only the scripts you want to be check
- make sure ecompile generates dependencies files ("GenerateDependencyInfo 1" in ecompile.cfg)
- start ecompile in that folder
- move into that folder and type:
java -jar inc2trash.jar
By default if looks into its folder and subdirectories and shows the .inc files unused and the .inc files used but not found.
Code: Select all
Unused Includes Finder v0.1 Author: Gnafu This program will search the POL includes files (.inc) in all subdirectories and will check if they are used by any compiled script by looking into the dependencies files (.dep) found. Usage: java -jar <thisfilename>.jar [args] -? : This help -v : Verbose -s : Shows all the paths found -p path : The root path to look into
False positives cases:
- you are running the tool into the includes folder: it will list ALL of them as unused because there are no dep files in there
- you disabled some pkgs or they are not compiled: it will list all the .inc files in that pkgs as unused because there are no dep files in there
I hope it will be usefull to you too!!!
Please let me know how can I improve it (default behaviour, functions, etc..)