Is there any way to search for executable files in windows when it has been renamed? Say a .exe file has been renamed to a .txt or a .jpeg extension.
Windows – find binary files in windows
file managementwindows
file managementwindows
Is there any way to search for executable files in windows when it has been renamed? Say a .exe file has been renamed to a .txt or a .jpeg extension.
Best Answer
You can use the Unix
file
utility, which can tell you what a file is based on its contents. You will need either the Cygwin environment or a win32-port package like GnuWin32 or UnxUtils.Here's how
file
works:Obviously, you have to give
file
a filename (or list of filenames) as an argument(s). You could do this withfind
if you know roughly where the file should be, by usingfind
and a folder name:If you combine this with
grep
, you can strip out the non-executables:Cygwin and GnuWin32 both provide the
file
andfind
commands (via thefile
andfindutils
packages).UnxUtils includes
find
, but I can't verify that thefile
command is included. The package does not appear to be maintained, so GnuWin32 is probably a better option.