Helps you find and eliminate unused images & files in web projects/applications.
Latest Changes:
v1.4.0
- Made picturebox a little bigger, and moved outside of bounds of main window for better ergonomics
- Added image-preview checkbox to not have to alt-click on an image to trigger display
- Added some extra checking for file path operations
- Fixed some thread-safety issues
- Added "Launch External" to context menu to launch a file with it's associated external program
- Switched search method, 2x faster, especially on extra large folders (2000+ files)
- Ordered files in list
- Prevent from searching for a reference of oneself (foo.css inside foo.css)
- Made form resizable
- Added button to cancel a search in progress in case of long running instance
- Added pseudo-dropdown to pattern textboxes
- Items are auto-added after a sucessful search
- Items can be deleted via a right-click on the textbox
- Added update check in help menu
- Added auto-update check to option panel
- Added exclusion list to option panel
- Can be file names or folders (backslash)
- Anything matched will be ignored
- Added a treeview pane to see in which files ressources are used in
- Has some context menus, but some things like multi-select do not work in treeviews, thus the Flat View pane that remains
- Fixed Visual Studio from crashing when double-clicking a file
- This was happeneing when "track active item in solution explorer" was already checked in VS options
- Switched .csproj back to VS2013 temporarily to fix some issues on 2013. Has no impact on 2015
Introduction
The other day at work I was cleaning up a project and got frustrated because i wanted to remove all images that are no longer referenced inside CSHTML, CSS, and LESS files ..but couldn't find any soft or plugin that would help me, so I got stuck with selecting each image name one by one and then searching through the entire project for each file to see if I got a match or not ..Grrrrr!
So I decided to whip up a little soft to help automate just that.
Works as a Standalone Application, from the Windows Explorer context menu, from the Command Line, or as a Visual Studio extension. Thank's to the command line it can easily be integrated with your favorite development IDE too.
Flat View
Tree View
File/Folder Exclusions
Thumbnail Preview
Parsing Dialog
Windows Explorer (context menu)
Visual Studio (context menu)
The process was really easy, so unless i missed something, i'm surprised i couldn't find some program on the web that already did just that.
Anyways here's how it works:
- enter a regexp that matches files you want to match
- choose if you want to match if they are used or not used
- choose what filetypes you want to search within to see if they have references in there
- select your starting directory
- ......processing
The simple logic behind it:
- load all file names from base directory & sub-directories
- extract all file names that match what we are looking for
- extract all file names that match which files we will be searching in
- iterate over each of the files we are searching in
- open each file and iterate over the content
- check if the content contains a match and add to a match list if so
- do a diff between matched and all
That's all, and it's pretty fast too. And since it uses standard regexp as input, you can match pretty much anything in any type of file.
Features:
- Can be launched via the command line. Like this it's easy to integrate with Visual Studio, Eclipse, Zend Studio, NetBeans, IntelliJ IDEA, etc.
- Double clicking a path in the visible list will open the directory the file is contained in
- Once file processing is done you can toggle the visible list between used/unused lists
- Select items in list and export the paths to a text file for later investigation
- Regexp criteria is saved after successful search and restored on application launch
- Selecting one or more paths in the visible list and clicking delete, will prompt you if you really want to delete the file(s)
-
Requires .NET 4 for the Application or .NET 4.5 / Visual Studio 2012 (and up) for the Plug-in
Change log
v1.4.0
- Made picturebox a little bigger, and moved outside of bounds of main window for better ergonomics
- Added image-preview checkbox to not have to alt-click on an image to trigger display
- Added some extra checking for file path operations
- Fixed some thread-safety issues
- Added "Launch External" to context menu to launch a file with it's associated external program
- Switched search method, 2x faster, especially on extra large folders (2000+ files)
- Ordered files in list
- Prevent from searching for a reference of oneself (foo.css inside foo.css)
- Made form resizable
- Added button to cancel a search in progress in case of long running instance
- Added pseudo-dropdown to pattern textboxes
- Items are auto-added after a sucessful search
- Items can be deleted via a right-click on the textbox
- Added update check in help menu
- Added auto-update check to option panel
- Added exclusion list to option panel
- Can be file names or folders (backslash)
- Anything matched will be ignored
- Added a treeview pane to see in which files ressources are used in
- Has some context menus, but some things like multi-select do not work in treeviews, thus the Flat View pane that remains
- Fixed Visual Studio from crashing when double-clicking a file
- This was happeneing when "track active item in solution explorer" was already checked in VS options
- Switched .csproj back to VS2013 temporarily to fix some issues on 2013. Has no impact on 2015
v1.3.1
- Added SVG, CSS, JS to default item list
- Added scss to default files list
- Made search culture-invariant / case-insensitive
- (extension) Added Visual Studio: Enterprise & Community to supported platform list
- (extension) Solution (.sln) will now only build with Visual Studio 2015
- But plug-in will work with Visual Studio 2012 and up
- Released Source-Code on Github
v1.3
- Alt-Click in list will show image thumbnail if it's an image
- Double-Click on list will open & set focus to item in solution explorer (VSIX only)
- Shell integration (EXE only)
- Add/Remove from Help menu, or register/unregister from command line with -s t
- More file stats
v1.2
- Changed UI a bit
- Context menus
- Select All
- Select Other
- Export Selection
- Delete Selection
- Explore Here
- Verify Selection (VSIX only: launches automated VS file search)
- Command line parameters (EXE only)
- -p path
- -r report type
- -f find regexp
- -i inside regexp
- Help Menu
- Manual
- Change-log
- Website
- About
- License
- More file stats
- More error handling
v1.1
- Disable delete button if no are files selected
- Enabled searching in website projects (VSIX)
- More error messages on invalid and/or unsuccessful operations
v1.0 (Visual Studio Plug-in)
- .EXE and VSIX versions now share same code-base
- Various modifications to accommodate different behavior in Visual Studio Mode & Standalone Mode
- Enabled searching in application projects
v1.0 (Application)
- Toggle between used/unused lists
- Export used/unused lists
- Delete file(s) with confirmation prompt
- Save search criteria after search
- Show errors on invalid regexps
- Restore search criteria on application launch
- Double click used/unused list opens containing directory
- Allow passing file/directory path via command line