EzDevInfo.com

file-extension interview questions

Top file-extension frequently asked interview questions

Automatically hide files with certain extension in Windows

Is it possible for Windows to automatically hide files with a certain extension?

Let's say some program generates a set of files (I cant alter the sources of the program), and I would like some of these files to be recognized by the system by their extension and automatically set hidden – is it possible?


Source: (StackOverflow)

How does a file have no extension?

Take for instance:

cat /etc/passwd

Why doesn't this file have an extension such as *.txt*, *.dat*, etc? Or does an extension exist, but it's just being hidden?

Does this apply strictly to Unix-like systems?


Source: (StackOverflow)

Advertisements

Is there a tool that can determine the file type from containing data? [closed]

I sometimes get files from my clients that have the wrong file extension. For example, the name is image.jpg but the file is actually a TIFF image. In many cases I can clarify it by opening the file in a text editor, looking at the first few bytes, then deducing which file type it is.

This works for me with JPEG, TIFF, GIF and PDF files. However there are many more file types out there.

Is there a possibility to automate identification of the correct file type by analyzing the containing data?


Source: (StackOverflow)

Running shortcut from command prompt without the .lnk extension (Windows)

I have created a folder (d:\shortcuts), created shortcuts for most applications in this folder and appended the folder path to the Path environment variable. Now all my applications are available from run and command window without messing around with Path.

However, I now have to type the name of the shortcut as well as extension (e.g. vlc.lnk) to invoke it. Is there any way to do this without typing the extension?


Source: (StackOverflow)

Is there a difference between .JPG and .jpg?

Files that have uppercase extensions (specifically .JPG) are not opening or being recognized in Windows Live Photo Gallery. .jpg files work as expected. What could be causing this issue?


Source: (StackOverflow)

Are you allowed to come up with any desired file extension (for Unix, Linux, Windows)?

I want to create a file called "message" that contains text only. How does the system know what program to use to read it if I decide to call it:

  • message.txt?
  • message.dat?
  • message.enc?
  • message.cpz?
  • message.asdfasdf?
  • message.abcdefghijklmnopqrstuvwxyz?
  • message.this_is_so_random?
  • or just 'message' with no extension?

I was wondering this for text-only files, but what about files that contain video and audio?


Source: (StackOverflow)

Searching for Extensionless Files in Windows 7

I cannot for the life of me figure out a way to have Windows 7 Explorer search for files with no extension. In XP it was nice and simple: just search for files named *. but in 7, that does not work and returns all files, as does ext:..

Searching has become extremely burdensome in Windows 7. Does anyone know how to perform this previously simple task?


Source: (StackOverflow)

File extension for Markdown files?

Is there an official file extension for standalone Markdown files?


Source: (StackOverflow)

Does it make sense converting a file to a higher audio bitrate?

When a certain file (mp4, flv, etc) has a 95 kbps audio bitrate - does it make sense outputing to a higher bitrate when converting to mp3 or other format (be it lossy or not)?

Would this result in higher audio quality or just in a bigger file?


Edits after a lot of answers+comments:

  • I am not talking about the output having better quality than the input: obviously, that is not possible. (Except for going from a lossless format to the original wave.) I am talking whether an output with a higher bitrate than the input will have a better quality than it might otherwise have.

  • please consider that I am aware that converting between lossy formats is not recommendable. Only that in some cases an original cd/wave may be unavailable. The question is just about the usefulness of optionally increasing the bitrate when converting.

  • maybe a sub-question is useful: is the answer dependent on the type of the output file (lossless or lossy)?

  • the most voted two answers below (this and this) seem to say different things, namely, the later says that Bitrates are not directly comparable and if the original audio is in a more efficient format, then the output (less efficient) audio should have a somewhat superior bitrate (the same idea here and here) - but while the less efficient is mp3, I am not sure which exactly are the more efficient formats. (is it aac?) (-- And in general the answers seem to fall in one of the two positions represented by the most voted answers.)


Source: (StackOverflow)

How do I find out the file type without an extension? [duplicate]

This question already has an answer here:

After recovering my HDD, I ended up with a lot of files with no extension. Many of them are .bin files.

Is there any way to find out what file format they actually are?

Many of them have no information if I edit them with Notepad++ or Hex Editors.


Source: (StackOverflow)

Programatically associate file extensions with application on Windows

I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally).

I am thinking for the future, wouldn't it be grand to have some kind of batch file that could automatically associate a selection of file extensions with N++ at the click of a button, rather than having to wait until I encounter all these extensions then go through the rigmarole of navigating to the N++ exe etc.

I can't do this with the Default Programs utility that comes with Windows 7, because it only works with extensions that have been 'encountered'.

So is it possible to programatically associate file extensions with application on Windows?


Source: (StackOverflow)

On Windows, what filename extensions denote an executable?

On Windows, *.exe, *.bat, *.cmd, and *.com all represent programs or shell scripts that can be run, simply by double-clicking them. Are there any other filename extensions that indicate a file is executable?

EDIT: When I jump into a new project (or back into an old project!), one of the common things I want to do when looking around is to find out what tools there are. On Unix (which I've used for decades), there's an execute bit, so this is as simple as:

find . -executable -type f

I figured that on Windows, which seems to have a much more complex mechanism for "is this executable (and how do I execute it)", there would be a relatively small number of file name extensions which would serve roughly the same purpose.

For my current project, *.exe *.bat *.cmd is almost certainly sufficient, but I figured I'd ask if there was an authoritative list.


Source: (StackOverflow)

What file format/database format does Picasa use?

I am trying to figure out what file format the .db file and .pmp files are. I tried using db_dump (Berkeley DB) for the .db files, but it seems that they are not Berkeley DB, or of an older version. I have no idea what the .PMP files are.

Directory of C:\Users\me\AppData\Local\Google\Picasa2\db3
 6/09/2010  08:07 PM           303,748 imagedata_uid64.pmp
 1/18/2010  10:34 PM             4,885 imagedata_unification_lhlist.pmp
 6/09/2010  10:55 PM           155,752 imagedata_width.pmp
 6/09/2010  10:55 PM     1,286,346,614 previews_0.db
 6/10/2010  10:06 AM           467,168 previews_index.db

Any help appreciated.


Source: (StackOverflow)

Get Windows to treat files with the same extension differently

Multiple programs use the same file extension, but the formats are totally different and incompatible. For instance, I have .sch files on my computer that are in at least 5 different formats (TINA, PSpice, PADS, Protel, and Eagle). Is there a way to get Windows to treat them differently, so that double-clicking on such a file opens it in the program it's meant to be opened in?

Linux uses magic numbers in the files themselves to differentiate, and only uses file extensions as a fallback plan. (All PNG files start with the bytes 89 50 4E 47 0D 0A 1A 0A, for instance, regardless of what you name them.) It would be nice if Windows could support this, but probably very difficult to implement. Maybe something simpler like a second-level extension, like filename.program1.sch and filename.program2.sch? Maybe some kind of filter that renames files on the fly?

Better idea: Associating the ambiguous extension with a pre-processor (.bat file or dedicated app) that checks for a second-level extension or goes into the file itself and scans for the magic number and then launches the appropriate program?


Source: (StackOverflow)

What in the world is a .el8 file?

I am taking an online Latin class, and they gave me a video to watch.

A .el8.

What? el8? I have never heard of that in my life. It's supposed to be a video, so I tried renaming it to a .mov (Latin teachers not being known for computational excellence), but no dice.

I'm running OS X 10.8. How do I open this thing?

Running file on it shows:

/Users/admin/Desktop/U734806R4970S3962792726.mov: data

And the first few lines of looking at it in vi are as follows:

^@^@^@^@^[U734806R4970S3962792726.el8T^L°w<80> ú#^?^G^@^@<88> ú#Ä^@#^@ÀÚ°wsÒѳ^@^@#^@^@ 
^@^@x^@ú#^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@üîÓ^P^Kê°wvp³wgÒѳ^@^@#^@^@^@^@^@^@^@^@^@ -#^@^@^@^@^@^B^D^@^@à(D
^@^@^@^@^PÖh
^@^@#^@^B^D#%^@^@^@^@ -#^@þ^C^@^@TïÓ^Pðo³w^@^@^@^@^@^@#^@^@^@#^@ø;^@^@ÿ<9e>iê^DÀCä@âQ<8c>PÂCä@5^X^@^@^R7 ^A^@^@^@ÔîÓ^P>^\±w^@^@#^@à(D^@^@^@^@^@^@^@^@^@^@^@#^@à(D
^@^@#^@þ^C^@ý^D^@^@^@^XÖh
^XÖh
¸c0
þ^C^@^@~^C^@^@ÌïÓ^P×<93>³w^@^@#^@à(D
^@^H^@^@¢s³wWÓѳ^@^@^@^@^@^@#^@è(D
<82>^C^@^@H.V
¨$î#^P ^@^@<94><82>¯w§Óѳ^B^D^@^@0.#^@^@^@^@^@^@^@#^@^PïÓ^P -#^@hïÓ^P^XÖh
H.V
xïÓ^P<9b><82>¯^@^@^@^@^@^@çiv^XÖh
^C^@^@^@<84>ïÓ^Phã°w0^A#^@¨^Fÿ^@þÿÿÿ¢s³wÕs³w^@^@^@^@^XÖh
<94><82>¯w?Óѳ^@^H^@^@è(D
^@^@^@^@^@^@^@^@ò½^@^@;C:\eLecta\Server\TempRecordings\U734806R4970S3962792726.el8¢s³wÕs³w^@^@^@^@è(D

Source: (StackOverflow)