Goomba wrote:
> Last year I mislabeled a .jpeg video and now I cannot find it. The extension
> could have been named .doc or .txt, and the file name is now unknown. Is
> there any way to search for .jpeg files regardless of how they may be
> labeled? Thank you,
It is possible to get info on files. I have two programs here
that may be useful. One is specifically for movies, and if you're working
with movies, that is the program to use. The other is general purpose,
but may not do as good a job identifying movie types.
*******
For video (like MJPEG a.k.a Motion JPEG), you can use GSPOT.
It has a batch mode, which allows dragging and dropping a handful
of files on the window at one time, and the "export" file will
have printed in it, what the files are.
http://gspot.headbands.com/
http://gspot.headbands.com/v26x/GSpot270a.zip (download)
For general file identification, first consider which OSes use
extensions and which do not. Windows is pretty dependent on
extensions. Linux and Unix don't depend on the extension.
Instead, Linux and Unix examine key bytes in the file
(usually in the first 1Kbyte), and determine the file type
that way. The operative term for the bytes they look at,
is the "magic function".
There is a port of the "file" program available.
http://gnuwin32.sourceforge.net/
http://gnuwin32.sourceforge.net/packages/file.htm
To get this working, you'll eventually end up with
a folder called "bin" and in it, will be files like
this.
file.exe
magic1.dll
regex2.dll
zlib1.dll
If the package has an installer, it should add an entry to
the Windows environment variable for execution "PATH". That
way, when you type "file" at the command prompt (MSDOS window),
the system will be able to find it. The dependencies for the
file, must be in the folder with it, and as far as I know,
the above list is complete.
For me to test that at the moment, I can open a Command Prompt
window, vopy a JPEG file into the "bin" folder, and type the name
of the command, and see what it says. This first example, will
print all the options the program has (--help calls up the help
function, like /? would do for a Windows program). The second
command example, carries out my test case.
C
Downloads\filetype_gnuwin32\bin> file --help
C
Downloads\filetype_gnuwin32\bin> file test.jpg
test.jpg; JPEG image data, JFIF standard 1.01
Now, if I renamed that test file to test.txt, the answer would
still be the same
C
Downloads\filetype_gnuwin32\bin> file test.txt
test.txt; JPEG image data, JFIF standard 1.01
So the program does its determination of file type, without
relying on the extension.
Neither of those example utilities, is "user friendly". With
a great deal of effort, they could be used in a script. You
can still use them by hand, but it will take you a *long* time
to find that file manually.
Good luck,
Paul