Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

content-type of file

Status
Not open for further replies.

varocho

Programmer
Dec 4, 2000
238
US
How can I determine the content-type of a file? (I need to send emails with attachments, and the attachments could be text files, Word documents, etc.)
 
If you are using any flavor of linux of unix, you should be able to use the program called file. Its usage on the command line is:

file filetotest

The program file is a part of the binutils package and usually installed by default.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top